Methods
pretty :: a -> DocprettyVersioned :: CabalSpecVersion -> a -> Doc
Instances81FieldGrammar, Pretty, …
Pretty OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.BackpackPretty OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.BackpackPretty AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerPretty CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerPretty CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerPretty FilePathNTDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty SpecLicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty SpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty TestedWithDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty TokenDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty Token'Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.LicensePretty ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleNamePretty CompatFilePathDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.FieldGrammarPretty CompatLicenseFileDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.FieldGrammarPretty LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicensePretty LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionIdPretty LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpressionPretty SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpressionPretty LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseIdPretty LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReferencePretty ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemPretty OSDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemPretty PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemPretty AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependencyPretty AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHashPretty BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkTypePretty BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildTypePretty ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentIdPretty ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentNamePretty DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyExample1 expression prettyShow $ Dependency (mkPackageName "pkg") anyVersion mainLibSet"pkg"
Example1 expression prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.insert (LSubLibName $ mkUnqualComponentName "sublib") mainLibSet"pkg:{pkg, sublib}"
Example1 expression prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.singleton (LSubLibName $ mkUnqualComponentName "sublib")"pkg:sublib"
Example1 expression prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.insert (LSubLibName $ mkUnqualComponentName "sublib-b") $ NES.singleton (LSubLibName $ mkUnqualComponentName "sublib-a")"pkg:{sublib-a, sublib-b}"
Pretty ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependencyPretty ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScopePretty ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModulePretty FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.FlagPretty FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.FlagPretty LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibPretty ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOptionPretty ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibTypePretty IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenamingPretty CompatPackageKeyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarPretty ExposedModulesDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarPretty InstWithDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarPretty SpecLicenseLenientDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarPretty LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependencyPretty LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibilityPretty MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MixinPretty ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModulePretty ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexportPretty ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenamingPretty MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageIdExample1 expression prettyShow $ MungedPackageId (MungedPackageName "servant" LMainLibName) (mkVersion [1,2,3])"servant-1.2.3"
Example1 expression prettyShow $ MungedPackageId (MungedPackageName "servant" (LSubLibName "lackey")) (mkVersion [0,1,2])"z-servant-z-lackey-0.1.2"
Pretty MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageNameComputes 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
foo, then it actually is an entry for the (only public) library in packagefoo. With internal packages, this is not necessarily true: a public library as well as arbitrarily many internal libraries may come from the same package. To prevent tools from getting confused in this case, the package name of these internal libraries is munged so that they do not conflict the public library proper. A particular case where this matters is ghc-pkg: if we don't munge the package name, the inplace registration will OVERRIDE a different internal library.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!
Example1 expression prettyShow $ MungedPackageName "servant" LMainLibName"servant"
Example1 expression prettyShow $ MungedPackageName "servant" (LSubLibName "lackey")"z-servant-z-lackey"
Pretty PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageIdPretty PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageNamePretty PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraintPretty PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependencyPretty PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigNamePretty PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionPretty PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRangePretty KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoPretty RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoPretty RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoPretty TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestTypePretty DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitIdPretty UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitIdThe textual format for UnitId coincides with the format GHC accepts for
-package-id.Pretty UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentNamePretty VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionPretty VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.InternalExample1 expression fmap pretty (simpleParsec' CabalSpecV1_6 "== 3.2.*" :: Maybe VersionRange)Just >=3.2 && <3.3
Example1 expression fmap (prettyVersioned CabalSpecV1_6) (simpleParsec' CabalSpecV1_6 "== 3.2.*" :: Maybe VersionRange)Just ==3.2.*
Example1 expression fmap pretty (simpleParsec' CabalSpecV1_6 "-any" :: Maybe VersionRange)Just >=0
Example1 expression fmap (prettyVersioned CabalSpecV1_6) (simpleParsec' CabalSpecV1_6 "-any" :: Maybe VersionRange)Just >=0
Pretty ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionPretty KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionPretty LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionPretty BoolDefined in Cabal-syntax-3.12.1.0 · Distribution.PrettyPretty IntDefined in Cabal-syntax-3.12.1.0 · Distribution.PrettyPretty DocDefined in Cabal-syntax-3.12.1.0 · Distribution.PrettyFieldGrammar Pretty PrettyFieldGrammarDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.PrettyPretty a => Pretty (MQuoted a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesPretty a => Pretty (Identity a)Defined in Cabal-syntax-3.12.1.0 · Distribution.PrettyPretty (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.Path(Newtype a b, Sep sep, Pretty b) => Pretty (List sep b a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes(Newtype a b, Sep sep, Pretty b) => Pretty (NonEmpty' sep b a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes(Newtype a b, Sep sep, Pretty b) => Pretty (Set' sep b a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.Newtypes