Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data MungedPackageName Source #
A combination of a package and component name used in various legacy
interfaces, chiefly bundled with a version as MungedPackageId
. It's generally
better to use a UnitId
to opaquely refer to some compilation/packing unit,
but that doesn't always work, e.g. where a "name" is needed, in which case
this can be used as a fallback.
Use mkMungedPackageName
and unMungedPackageName
to convert from/to a String
.
In 3.0.0.0
representation was changed from opaque (string) to semantic representation.
Since: 2.0.0.2
Instances
Eq MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName (==) :: MungedPackageName -> MungedPackageName -> Bool # (/=) :: MungedPackageName -> MungedPackageName -> Bool # | |
Data MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MungedPackageName -> c MungedPackageName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MungedPackageName # toConstr :: MungedPackageName -> Constr # dataTypeOf :: MungedPackageName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MungedPackageName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MungedPackageName) # gmapT :: (forall b. Data b => b -> b) -> MungedPackageName -> MungedPackageName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MungedPackageName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MungedPackageName -> r # gmapQ :: (forall d. Data d => d -> u) -> MungedPackageName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MungedPackageName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MungedPackageName -> m MungedPackageName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MungedPackageName -> m MungedPackageName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MungedPackageName -> m MungedPackageName # | |
Ord MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName compare :: MungedPackageName -> MungedPackageName -> Ordering # (<) :: MungedPackageName -> MungedPackageName -> Bool # (<=) :: MungedPackageName -> MungedPackageName -> Bool # (>) :: MungedPackageName -> MungedPackageName -> Bool # (>=) :: MungedPackageName -> MungedPackageName -> Bool # max :: MungedPackageName -> MungedPackageName -> MungedPackageName # min :: MungedPackageName -> MungedPackageName -> MungedPackageName # | |
Read MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName | |
Show MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName showsPrec :: Int -> MungedPackageName -> ShowS # show :: MungedPackageName -> String # showList :: [MungedPackageName] -> ShowS # | |
Generic MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName type Rep MungedPackageName :: Type -> Type # from :: MungedPackageName -> Rep MungedPackageName x # to :: Rep MungedPackageName x -> MungedPackageName # | |
Binary MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName put :: MungedPackageName -> Put # get :: Get MungedPackageName # putList :: [MungedPackageName] -> Put # | |
NFData MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName rnf :: MungedPackageName -> () # | |
Pretty MungedPackageName Source # | Computes the package name for a library. If this is the public library, it will just be the original package name; otherwise, it will be a munged package name recording the original package name as well as the name of the internal library. A lot of tooling in the Haskell ecosystem assumes that if something
is installed to the package database with the package name We munge into a reserved namespace, "z-", and encode both the component name and the package name of an internal library using the following format: compat-pkg-name ::= "z-" package-name "-z-" library-name where package-name and library-name have "-" ( "z" + ) "-" segments encoded by adding an extra "z". When we have the public library, the compat-pkg-name is just the package-name, no surprises there!
|
Defined in Distribution.Types.MungedPackageName pretty :: MungedPackageName -> Doc Source # prettyVersioned :: CabalSpecVersion -> MungedPackageName -> Doc Source # | |
Parsec MungedPackageName Source # |
|
Defined in Distribution.Types.MungedPackageName parsec :: CabalParsing m => m MungedPackageName Source # | |
type Rep MungedPackageName Source # | |
Defined in Distribution.Types.MungedPackageName type Rep MungedPackageName = D1 ('MetaData "MungedPackageName" "Distribution.Types.MungedPackageName" "Cabal-3.0.2.0-inplace" 'False) (C1 ('MetaCons "MungedPackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LibraryName))) |
decodeCompatPackageName :: PackageName -> MungedPackageName Source #
Intended for internal use only
>>>
decodeCompatPackageName "z-servant-z-lackey"
MungedPackageName (PackageName "servant") (LSubLibName (UnqualComponentName "lackey"))
encodeCompatPackageName :: MungedPackageName -> PackageName Source #
Intended for internal use only
>>>
encodeCompatPackageName $ MungedPackageName "servant" (LSubLibName "lackey")
PackageName "z-servant-z-lackey"
This is used in cabal-install
in the Solver.
May become obsolete as solver moves to per-component solving.