{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Distribution.Types.ForeignLibOption(
ForeignLibOption(..)
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Pretty
import Distribution.Parsec
import qualified Distribution.Compat.CharParsing as P
import qualified Text.PrettyPrint as Disp
data ForeignLibOption =
ForeignLibStandalone
deriving (forall x. Rep ForeignLibOption x -> ForeignLibOption
forall x. ForeignLibOption -> Rep ForeignLibOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ForeignLibOption x -> ForeignLibOption
$cfrom :: forall x. ForeignLibOption -> Rep ForeignLibOption x
Generic, Int -> ForeignLibOption -> ShowS
[ForeignLibOption] -> ShowS
ForeignLibOption -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ForeignLibOption] -> ShowS
$cshowList :: [ForeignLibOption] -> ShowS
show :: ForeignLibOption -> String
$cshow :: ForeignLibOption -> String
showsPrec :: Int -> ForeignLibOption -> ShowS
$cshowsPrec :: Int -> ForeignLibOption -> ShowS
Show, ReadPrec [ForeignLibOption]
ReadPrec ForeignLibOption
Int -> ReadS ForeignLibOption
ReadS [ForeignLibOption]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ForeignLibOption]
$creadListPrec :: ReadPrec [ForeignLibOption]
readPrec :: ReadPrec ForeignLibOption
$creadPrec :: ReadPrec ForeignLibOption
readList :: ReadS [ForeignLibOption]
$creadList :: ReadS [ForeignLibOption]
readsPrec :: Int -> ReadS ForeignLibOption
$creadsPrec :: Int -> ReadS ForeignLibOption
Read, ForeignLibOption -> ForeignLibOption -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ForeignLibOption -> ForeignLibOption -> Bool
$c/= :: ForeignLibOption -> ForeignLibOption -> Bool
== :: ForeignLibOption -> ForeignLibOption -> Bool
$c== :: ForeignLibOption -> ForeignLibOption -> Bool
Eq, Eq ForeignLibOption
ForeignLibOption -> ForeignLibOption -> Bool
ForeignLibOption -> ForeignLibOption -> Ordering
ForeignLibOption -> ForeignLibOption -> ForeignLibOption
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ForeignLibOption -> ForeignLibOption -> ForeignLibOption
$cmin :: ForeignLibOption -> ForeignLibOption -> ForeignLibOption
max :: ForeignLibOption -> ForeignLibOption -> ForeignLibOption
$cmax :: ForeignLibOption -> ForeignLibOption -> ForeignLibOption
>= :: ForeignLibOption -> ForeignLibOption -> Bool
$c>= :: ForeignLibOption -> ForeignLibOption -> Bool
> :: ForeignLibOption -> ForeignLibOption -> Bool
$c> :: ForeignLibOption -> ForeignLibOption -> Bool
<= :: ForeignLibOption -> ForeignLibOption -> Bool
$c<= :: ForeignLibOption -> ForeignLibOption -> Bool
< :: ForeignLibOption -> ForeignLibOption -> Bool
$c< :: ForeignLibOption -> ForeignLibOption -> Bool
compare :: ForeignLibOption -> ForeignLibOption -> Ordering
$ccompare :: ForeignLibOption -> ForeignLibOption -> Ordering
Ord, Typeable, Typeable ForeignLibOption
ForeignLibOption -> DataType
ForeignLibOption -> Constr
(forall b. Data b => b -> b)
-> ForeignLibOption -> ForeignLibOption
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ForeignLibOption -> u
forall u. (forall d. Data d => d -> u) -> ForeignLibOption -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForeignLibOption
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForeignLibOption -> c ForeignLibOption
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForeignLibOption)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ForeignLibOption)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ForeignLibOption -> m ForeignLibOption
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ForeignLibOption -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ForeignLibOption -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ForeignLibOption -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ForeignLibOption -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForeignLibOption -> r
gmapT :: (forall b. Data b => b -> b)
-> ForeignLibOption -> ForeignLibOption
$cgmapT :: (forall b. Data b => b -> b)
-> ForeignLibOption -> ForeignLibOption
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ForeignLibOption)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ForeignLibOption)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForeignLibOption)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForeignLibOption)
dataTypeOf :: ForeignLibOption -> DataType
$cdataTypeOf :: ForeignLibOption -> DataType
toConstr :: ForeignLibOption -> Constr
$ctoConstr :: ForeignLibOption -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForeignLibOption
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForeignLibOption
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForeignLibOption -> c ForeignLibOption
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForeignLibOption -> c ForeignLibOption
Data)
instance Pretty ForeignLibOption where
pretty :: ForeignLibOption -> Doc
pretty ForeignLibOption
ForeignLibStandalone = String -> Doc
Disp.text String
"standalone"
instance Parsec ForeignLibOption where
parsec :: forall (m :: * -> *). CabalParsing m => m ForeignLibOption
parsec = do
String
name <- forall (m :: * -> *). CharParsing m => (Char -> Bool) -> m String
P.munch1 (\Char
c -> Char -> Bool
isAlphaNum Char
c Bool -> Bool -> Bool
|| Char
c forall a. Eq a => a -> a -> Bool
== Char
'-')
case String
name of
String
"standalone" -> forall (m :: * -> *) a. Monad m => a -> m a
return ForeignLibOption
ForeignLibStandalone
String
_ -> forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"unrecognized foreign-library option"
instance Binary ForeignLibOption
instance Structured ForeignLibOption
instance NFData ForeignLibOption where rnf :: ForeignLibOption -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf