{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
module Distribution.Types.UnitId
( UnitId, unUnitId, mkUnitId
, DefUnitId
, unsafeMkDefUnitId
, unDefUnitId
, newSimpleUnitId
, mkLegacyUnitId
, getHSLibraryName
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Utils.ShortText
import qualified Distribution.Compat.CharParsing as P
import Distribution.Pretty
import Distribution.Parsec
import Distribution.Types.ComponentId
import Distribution.Types.PackageId
import Text.PrettyPrint (text)
newtype UnitId = UnitId ShortText
deriving ((forall x. UnitId -> Rep UnitId x)
-> (forall x. Rep UnitId x -> UnitId) -> Generic UnitId
forall x. Rep UnitId x -> UnitId
forall x. UnitId -> Rep UnitId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnitId x -> UnitId
$cfrom :: forall x. UnitId -> Rep UnitId x
Generic, ReadPrec [UnitId]
ReadPrec UnitId
Int -> ReadS UnitId
ReadS [UnitId]
(Int -> ReadS UnitId)
-> ReadS [UnitId]
-> ReadPrec UnitId
-> ReadPrec [UnitId]
-> Read UnitId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnitId]
$creadListPrec :: ReadPrec [UnitId]
readPrec :: ReadPrec UnitId
$creadPrec :: ReadPrec UnitId
readList :: ReadS [UnitId]
$creadList :: ReadS [UnitId]
readsPrec :: Int -> ReadS UnitId
$creadsPrec :: Int -> ReadS UnitId
Read, Int -> UnitId -> ShowS
[UnitId] -> ShowS
UnitId -> String
(Int -> UnitId -> ShowS)
-> (UnitId -> String) -> ([UnitId] -> ShowS) -> Show UnitId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnitId] -> ShowS
$cshowList :: [UnitId] -> ShowS
show :: UnitId -> String
$cshow :: UnitId -> String
showsPrec :: Int -> UnitId -> ShowS
$cshowsPrec :: Int -> UnitId -> ShowS
Show, UnitId -> UnitId -> Bool
(UnitId -> UnitId -> Bool)
-> (UnitId -> UnitId -> Bool) -> Eq UnitId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnitId -> UnitId -> Bool
$c/= :: UnitId -> UnitId -> Bool
== :: UnitId -> UnitId -> Bool
$c== :: UnitId -> UnitId -> Bool
Eq, Eq UnitId
Eq UnitId
-> (UnitId -> UnitId -> Ordering)
-> (UnitId -> UnitId -> Bool)
-> (UnitId -> UnitId -> Bool)
-> (UnitId -> UnitId -> Bool)
-> (UnitId -> UnitId -> Bool)
-> (UnitId -> UnitId -> UnitId)
-> (UnitId -> UnitId -> UnitId)
-> Ord UnitId
UnitId -> UnitId -> Bool
UnitId -> UnitId -> Ordering
UnitId -> UnitId -> UnitId
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 :: UnitId -> UnitId -> UnitId
$cmin :: UnitId -> UnitId -> UnitId
max :: UnitId -> UnitId -> UnitId
$cmax :: UnitId -> UnitId -> UnitId
>= :: UnitId -> UnitId -> Bool
$c>= :: UnitId -> UnitId -> Bool
> :: UnitId -> UnitId -> Bool
$c> :: UnitId -> UnitId -> Bool
<= :: UnitId -> UnitId -> Bool
$c<= :: UnitId -> UnitId -> Bool
< :: UnitId -> UnitId -> Bool
$c< :: UnitId -> UnitId -> Bool
compare :: UnitId -> UnitId -> Ordering
$ccompare :: UnitId -> UnitId -> Ordering
$cp1Ord :: Eq UnitId
Ord, Typeable, Typeable UnitId
DataType
Constr
Typeable UnitId
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnitId -> c UnitId)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnitId)
-> (UnitId -> Constr)
-> (UnitId -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnitId))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId))
-> ((forall b. Data b => b -> b) -> UnitId -> UnitId)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UnitId -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UnitId -> r)
-> (forall u. (forall d. Data d => d -> u) -> UnitId -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> UnitId -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId)
-> Data UnitId
UnitId -> DataType
UnitId -> Constr
(forall b. Data b => b -> b) -> UnitId -> UnitId
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnitId -> c UnitId
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnitId
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) -> UnitId -> u
forall u. (forall d. Data d => d -> u) -> UnitId -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnitId
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnitId -> c UnitId
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnitId)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId)
$cUnitId :: Constr
$tUnitId :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> UnitId -> m UnitId
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId
gmapMp :: (forall d. Data d => d -> m d) -> UnitId -> m UnitId
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId
gmapM :: (forall d. Data d => d -> m d) -> UnitId -> m UnitId
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnitId -> m UnitId
gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitId -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UnitId -> u
gmapQ :: (forall d. Data d => d -> u) -> UnitId -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> UnitId -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r
gmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId
$cgmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c UnitId)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnitId)
dataTypeOf :: UnitId -> DataType
$cdataTypeOf :: UnitId -> DataType
toConstr :: UnitId -> Constr
$ctoConstr :: UnitId -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnitId
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnitId
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnitId -> c UnitId
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnitId -> c UnitId
$cp1Data :: Typeable UnitId
Data, UnitId -> ()
(UnitId -> ()) -> NFData UnitId
forall a. (a -> ()) -> NFData a
rnf :: UnitId -> ()
$crnf :: UnitId -> ()
NFData)
instance Binary UnitId
instance Pretty UnitId where
pretty :: UnitId -> Doc
pretty = String -> Doc
text (String -> Doc) -> (UnitId -> String) -> UnitId -> Doc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UnitId -> String
unUnitId
instance Parsec UnitId where
parsec :: m UnitId
parsec = String -> UnitId
mkUnitId (String -> UnitId) -> m String -> m UnitId
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Char -> Bool) -> m String
forall (m :: * -> *). CharParsing m => (Char -> Bool) -> m String
P.munch1 (\Char
c -> Char -> Bool
isAlphaNum Char
c Bool -> Bool -> Bool
|| Char
c Char -> String -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` String
"-_.+")
unUnitId :: UnitId -> String
unUnitId :: UnitId -> String
unUnitId (UnitId ShortText
s) = ShortText -> String
fromShortText ShortText
s
mkUnitId :: String -> UnitId
mkUnitId :: String -> UnitId
mkUnitId = ShortText -> UnitId
UnitId (ShortText -> UnitId) -> (String -> ShortText) -> String -> UnitId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ShortText
toShortText
instance IsString UnitId where
fromString :: String -> UnitId
fromString = String -> UnitId
mkUnitId
newSimpleUnitId :: ComponentId -> UnitId
newSimpleUnitId :: ComponentId -> UnitId
newSimpleUnitId = String -> UnitId
mkUnitId (String -> UnitId)
-> (ComponentId -> String) -> ComponentId -> UnitId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ComponentId -> String
unComponentId
mkLegacyUnitId :: PackageId -> UnitId
mkLegacyUnitId :: PackageId -> UnitId
mkLegacyUnitId = ComponentId -> UnitId
newSimpleUnitId (ComponentId -> UnitId)
-> (PackageId -> ComponentId) -> PackageId -> UnitId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ComponentId
mkComponentId (String -> ComponentId)
-> (PackageId -> String) -> PackageId -> ComponentId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PackageId -> String
forall a. Pretty a => a -> String
prettyShow
getHSLibraryName :: UnitId -> String
getHSLibraryName :: UnitId -> String
getHSLibraryName UnitId
uid = String
"HS" String -> ShowS
forall a. [a] -> [a] -> [a]
++ UnitId -> String
forall a. Pretty a => a -> String
prettyShow UnitId
uid
newtype DefUnitId = DefUnitId { DefUnitId -> UnitId
unDefUnitId :: UnitId }
deriving ((forall x. DefUnitId -> Rep DefUnitId x)
-> (forall x. Rep DefUnitId x -> DefUnitId) -> Generic DefUnitId
forall x. Rep DefUnitId x -> DefUnitId
forall x. DefUnitId -> Rep DefUnitId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DefUnitId x -> DefUnitId
$cfrom :: forall x. DefUnitId -> Rep DefUnitId x
Generic, ReadPrec [DefUnitId]
ReadPrec DefUnitId
Int -> ReadS DefUnitId
ReadS [DefUnitId]
(Int -> ReadS DefUnitId)
-> ReadS [DefUnitId]
-> ReadPrec DefUnitId
-> ReadPrec [DefUnitId]
-> Read DefUnitId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefUnitId]
$creadListPrec :: ReadPrec [DefUnitId]
readPrec :: ReadPrec DefUnitId
$creadPrec :: ReadPrec DefUnitId
readList :: ReadS [DefUnitId]
$creadList :: ReadS [DefUnitId]
readsPrec :: Int -> ReadS DefUnitId
$creadsPrec :: Int -> ReadS DefUnitId
Read, Int -> DefUnitId -> ShowS
[DefUnitId] -> ShowS
DefUnitId -> String
(Int -> DefUnitId -> ShowS)
-> (DefUnitId -> String)
-> ([DefUnitId] -> ShowS)
-> Show DefUnitId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefUnitId] -> ShowS
$cshowList :: [DefUnitId] -> ShowS
show :: DefUnitId -> String
$cshow :: DefUnitId -> String
showsPrec :: Int -> DefUnitId -> ShowS
$cshowsPrec :: Int -> DefUnitId -> ShowS
Show, DefUnitId -> DefUnitId -> Bool
(DefUnitId -> DefUnitId -> Bool)
-> (DefUnitId -> DefUnitId -> Bool) -> Eq DefUnitId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefUnitId -> DefUnitId -> Bool
$c/= :: DefUnitId -> DefUnitId -> Bool
== :: DefUnitId -> DefUnitId -> Bool
$c== :: DefUnitId -> DefUnitId -> Bool
Eq, Eq DefUnitId
Eq DefUnitId
-> (DefUnitId -> DefUnitId -> Ordering)
-> (DefUnitId -> DefUnitId -> Bool)
-> (DefUnitId -> DefUnitId -> Bool)
-> (DefUnitId -> DefUnitId -> Bool)
-> (DefUnitId -> DefUnitId -> Bool)
-> (DefUnitId -> DefUnitId -> DefUnitId)
-> (DefUnitId -> DefUnitId -> DefUnitId)
-> Ord DefUnitId
DefUnitId -> DefUnitId -> Bool
DefUnitId -> DefUnitId -> Ordering
DefUnitId -> DefUnitId -> DefUnitId
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 :: DefUnitId -> DefUnitId -> DefUnitId
$cmin :: DefUnitId -> DefUnitId -> DefUnitId
max :: DefUnitId -> DefUnitId -> DefUnitId
$cmax :: DefUnitId -> DefUnitId -> DefUnitId
>= :: DefUnitId -> DefUnitId -> Bool
$c>= :: DefUnitId -> DefUnitId -> Bool
> :: DefUnitId -> DefUnitId -> Bool
$c> :: DefUnitId -> DefUnitId -> Bool
<= :: DefUnitId -> DefUnitId -> Bool
$c<= :: DefUnitId -> DefUnitId -> Bool
< :: DefUnitId -> DefUnitId -> Bool
$c< :: DefUnitId -> DefUnitId -> Bool
compare :: DefUnitId -> DefUnitId -> Ordering
$ccompare :: DefUnitId -> DefUnitId -> Ordering
$cp1Ord :: Eq DefUnitId
Ord, Typeable, Typeable DefUnitId
DataType
Constr
Typeable DefUnitId
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DefUnitId -> c DefUnitId)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DefUnitId)
-> (DefUnitId -> Constr)
-> (DefUnitId -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DefUnitId))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DefUnitId))
-> ((forall b. Data b => b -> b) -> DefUnitId -> DefUnitId)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r)
-> (forall u. (forall d. Data d => d -> u) -> DefUnitId -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> DefUnitId -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId)
-> Data DefUnitId
DefUnitId -> DataType
DefUnitId -> Constr
(forall b. Data b => b -> b) -> DefUnitId -> DefUnitId
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DefUnitId -> c DefUnitId
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DefUnitId
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) -> DefUnitId -> u
forall u. (forall d. Data d => d -> u) -> DefUnitId -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DefUnitId
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DefUnitId -> c DefUnitId
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DefUnitId)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DefUnitId)
$cDefUnitId :: Constr
$tDefUnitId :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
gmapMp :: (forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
gmapM :: (forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DefUnitId -> m DefUnitId
gmapQi :: Int -> (forall d. Data d => d -> u) -> DefUnitId -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DefUnitId -> u
gmapQ :: (forall d. Data d => d -> u) -> DefUnitId -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DefUnitId -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DefUnitId -> r
gmapT :: (forall b. Data b => b -> b) -> DefUnitId -> DefUnitId
$cgmapT :: (forall b. Data b => b -> b) -> DefUnitId -> DefUnitId
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DefUnitId)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DefUnitId)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DefUnitId)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DefUnitId)
dataTypeOf :: DefUnitId -> DataType
$cdataTypeOf :: DefUnitId -> DataType
toConstr :: DefUnitId -> Constr
$ctoConstr :: DefUnitId -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DefUnitId
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DefUnitId
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DefUnitId -> c DefUnitId
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DefUnitId -> c DefUnitId
$cp1Data :: Typeable DefUnitId
Data, Get DefUnitId
[DefUnitId] -> Put
DefUnitId -> Put
(DefUnitId -> Put)
-> Get DefUnitId -> ([DefUnitId] -> Put) -> Binary DefUnitId
forall t. (t -> Put) -> Get t -> ([t] -> Put) -> Binary t
putList :: [DefUnitId] -> Put
$cputList :: [DefUnitId] -> Put
get :: Get DefUnitId
$cget :: Get DefUnitId
put :: DefUnitId -> Put
$cput :: DefUnitId -> Put
Binary, DefUnitId -> ()
(DefUnitId -> ()) -> NFData DefUnitId
forall a. (a -> ()) -> NFData a
rnf :: DefUnitId -> ()
$crnf :: DefUnitId -> ()
NFData, CabalSpecVersion -> DefUnitId -> Doc
DefUnitId -> Doc
(DefUnitId -> Doc)
-> (CabalSpecVersion -> DefUnitId -> Doc) -> Pretty DefUnitId
forall a. (a -> Doc) -> (CabalSpecVersion -> a -> Doc) -> Pretty a
prettyVersioned :: CabalSpecVersion -> DefUnitId -> Doc
$cprettyVersioned :: CabalSpecVersion -> DefUnitId -> Doc
pretty :: DefUnitId -> Doc
$cpretty :: DefUnitId -> Doc
Pretty)
instance Parsec DefUnitId where
parsec :: m DefUnitId
parsec = UnitId -> DefUnitId
DefUnitId (UnitId -> DefUnitId) -> m UnitId -> m DefUnitId
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m UnitId
forall a (m :: * -> *). (Parsec a, CabalParsing m) => m a
parsec
unsafeMkDefUnitId :: UnitId -> DefUnitId
unsafeMkDefUnitId :: UnitId -> DefUnitId
unsafeMkDefUnitId = UnitId -> DefUnitId
DefUnitId