Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module does two things:
- Acts as a compatibility layer, like
base-compat
. - Provides commonly used imports.
This module is a superset of Distribution.Compat.Prelude (which this module re-exports)
Synopsis
- module Distribution.Compat.Prelude.Internal
- data Verbosity
- class Pretty a where
- pretty :: a -> Doc
- prettyVersioned :: CabalSpecVersion -> a -> Doc
- class (CharParsing m, MonadPlus m, MonadFail m) => CabalParsing (m :: Type -> Type)
- class Parsec a where
- parsec :: CabalParsing m => m a
- prettyShow :: Pretty a => a -> String
- simpleParsec :: Parsec a => String -> Maybe a
- eitherParsec :: Parsec a => String -> Either String a
- explicitEitherParsec :: ParsecParser a -> String -> Either String a
Documentation
Instances
Parsec Verbosity | Parser verbosity
Note: this parser will eat trailing spaces. |
Defined in Distribution.Verbosity parsec :: CabalParsing m => m Verbosity # | |
Pretty Verbosity | |
Defined in Distribution.Verbosity prettyVersioned :: CabalSpecVersion -> Verbosity -> Doc # | |
Structured Verbosity | |
Defined in Distribution.Verbosity | |
Bounded Verbosity | |
Enum Verbosity | |
Defined in Distribution.Verbosity succ :: Verbosity -> Verbosity # pred :: Verbosity -> Verbosity # fromEnum :: Verbosity -> Int # enumFrom :: Verbosity -> [Verbosity] # enumFromThen :: Verbosity -> Verbosity -> [Verbosity] # enumFromTo :: Verbosity -> Verbosity -> [Verbosity] # enumFromThenTo :: Verbosity -> Verbosity -> Verbosity -> [Verbosity] # | |
Generic Verbosity | |
Read Verbosity | |
Show Verbosity | |
Binary Verbosity | |
Eq Verbosity | |
Ord Verbosity | |
Defined in Distribution.Verbosity | |
type Rep Verbosity | |
Defined in Distribution.Verbosity type Rep Verbosity = D1 ('MetaData "Verbosity" "Distribution.Verbosity" "Cabal-3.14.1.1-KNG8xgahazw32ECV34zzCb" 'False) (C1 ('MetaCons "Verbosity" 'PrefixI 'True) (S1 ('MetaSel ('Just "vLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VerbosityLevel) :*: (S1 ('MetaSel ('Just "vFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set VerbosityFlag)) :*: S1 ('MetaSel ('Just "vQuiet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) |
prettyVersioned :: CabalSpecVersion -> a -> Doc #
Instances
class (CharParsing m, MonadPlus m, MonadFail m) => CabalParsing (m :: Type -> Type) #
Parsing class which
- can report Cabal parser warnings.
- knows
cabal-version
we work with
Instances
Class for parsing with parsec
. Mainly used for .cabal
file fields.
For parsing .cabal
like file structure, see Distribution.Fields.
parsec :: CabalParsing m => m a #
Instances
Parsec FilePathRoot | |
Defined in Distribution.Simple.FileMonitor.Types parsec :: CabalParsing m => m FilePathRoot # | |
Parsec RootedGlob | |
Defined in Distribution.Simple.FileMonitor.Types parsec :: CabalParsing m => m RootedGlob # | |
Parsec Glob | |
Defined in Distribution.Simple.Glob.Internal parsec :: CabalParsing m => m Glob # | |
Parsec HaddockTarget | |
Defined in Distribution.Simple.Setup.Haddock parsec :: CabalParsing m => m HaddockTarget # | |
Parsec TestShowDetails | |
Defined in Distribution.Simple.Setup.Test parsec :: CabalParsing m => m TestShowDetails # | |
Parsec Verbosity | Parser verbosity
Note: this parser will eat trailing spaces. |
Defined in Distribution.Verbosity parsec :: CabalParsing m => m Verbosity # | |
Parsec OpenModule |
|
Defined in Distribution.Backpack parsec :: CabalParsing m => m OpenModule # | |
Parsec OpenUnitId |
|
Defined in Distribution.Backpack parsec :: CabalParsing m => m OpenUnitId # | |
Parsec AbiTag | |
Defined in Distribution.Compiler parsec :: CabalParsing m => m AbiTag # | |
Parsec CompilerFlavor | |
Defined in Distribution.Compiler parsec :: CabalParsing m => m CompilerFlavor # | |
Parsec CompilerId | |
Defined in Distribution.Compiler parsec :: CabalParsing m => m CompilerId # | |
Parsec FilePathNT | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m FilePathNT # | |
Parsec SpecLicense | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m SpecLicense # | |
Parsec SpecVersion | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m SpecVersion # | |
Parsec TestedWith | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m TestedWith # | |
Parsec Token | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m Token # | |
Parsec Token' | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m Token' # | |
Parsec License | |
Defined in Distribution.License parsec :: CabalParsing m => m License # | |
Parsec ModuleName | |
Defined in Distribution.ModuleName parsec :: CabalParsing m => m ModuleName # | |
Parsec CompatDataDir | |
Defined in Distribution.PackageDescription.FieldGrammar parsec :: CabalParsing m => m CompatDataDir # | |
Parsec CompatLicenseFile | |
Defined in Distribution.PackageDescription.FieldGrammar parsec :: CabalParsing m => m CompatLicenseFile # | |
Parsec License |
|
Defined in Distribution.SPDX.License parsec :: CabalParsing m => m License # | |
Parsec LicenseExceptionId | |
Defined in Distribution.SPDX.LicenseExceptionId parsec :: CabalParsing m => m LicenseExceptionId # | |
Parsec LicenseExpression | |
Defined in Distribution.SPDX.LicenseExpression parsec :: CabalParsing m => m LicenseExpression # | |
Parsec SimpleLicenseExpression | |
Defined in Distribution.SPDX.LicenseExpression parsec :: CabalParsing m => m SimpleLicenseExpression # | |
Parsec LicenseId |
|
Defined in Distribution.SPDX.LicenseId parsec :: CabalParsing m => m LicenseId # | |
Parsec LicenseRef | |
Defined in Distribution.SPDX.LicenseReference parsec :: CabalParsing m => m LicenseRef # | |
Parsec Arch | |
Defined in Distribution.System parsec :: CabalParsing m => m Arch # | |
Parsec OS | |
Defined in Distribution.System parsec :: CabalParsing m => m OS # | |
Parsec Platform | |
Defined in Distribution.System parsec :: CabalParsing m => m Platform # | |
Parsec AbiDependency | |
Defined in Distribution.Types.AbiDependency parsec :: CabalParsing m => m AbiDependency # | |
Parsec AbiHash | |
Defined in Distribution.Types.AbiHash parsec :: CabalParsing m => m AbiHash # | |
Parsec BenchmarkType | |
Defined in Distribution.Types.BenchmarkType parsec :: CabalParsing m => m BenchmarkType # | |
Parsec BuildType | |
Defined in Distribution.Types.BuildType parsec :: CabalParsing m => m BuildType # | |
Parsec ComponentId | |
Defined in Distribution.Types.ComponentId parsec :: CabalParsing m => m ComponentId # | |
Parsec ComponentName | |
Defined in Distribution.Types.ComponentName parsec :: CabalParsing m => m ComponentName # | |
Parsec Dependency |
Spaces around colon are not allowed:
Sublibrary syntax is accepted since
|
Defined in Distribution.Types.Dependency parsec :: CabalParsing m => m Dependency # | |
Parsec ExeDependency | Examples
|
Defined in Distribution.Types.ExeDependency parsec :: CabalParsing m => m ExeDependency # | |
Parsec ExecutableScope | |
Defined in Distribution.Types.ExecutableScope parsec :: CabalParsing m => m ExecutableScope # | |
Parsec ExposedModule | |
Defined in Distribution.Types.ExposedModule parsec :: CabalParsing m => m ExposedModule # | |
Parsec FlagAssignment |
Issue #7279 was fixed in Cabal-3.8
Since: Cabal-syntax-3.4.0.0 |
Defined in Distribution.Types.Flag parsec :: CabalParsing m => m FlagAssignment # | |
Parsec FlagName | |
Defined in Distribution.Types.Flag parsec :: CabalParsing m => m FlagName # | |
Parsec LibVersionInfo | |
Defined in Distribution.Types.ForeignLib parsec :: CabalParsing m => m LibVersionInfo # | |
Parsec ForeignLibOption | |
Defined in Distribution.Types.ForeignLibOption parsec :: CabalParsing m => m ForeignLibOption # | |
Parsec ForeignLibType | |
Defined in Distribution.Types.ForeignLibType parsec :: CabalParsing m => m ForeignLibType # | |
Parsec IncludeRenaming | |
Defined in Distribution.Types.IncludeRenaming parsec :: CabalParsing m => m IncludeRenaming # | |
Parsec LegacyExeDependency | |
Defined in Distribution.Types.LegacyExeDependency parsec :: CabalParsing m => m LegacyExeDependency # | |
Parsec LibraryVisibility | |
Defined in Distribution.Types.LibraryVisibility parsec :: CabalParsing m => m LibraryVisibility # | |
Parsec Mixin |
Sublibrary syntax is accepted since
|
Defined in Distribution.Types.Mixin parsec :: CabalParsing m => m Mixin # | |
Parsec Module | |
Defined in Distribution.Types.Module parsec :: CabalParsing m => m Module # | |
Parsec ModuleReexport | |
Defined in Distribution.Types.ModuleReexport parsec :: CabalParsing m => m ModuleReexport # | |
Parsec ModuleRenaming | |
Defined in Distribution.Types.ModuleRenaming parsec :: CabalParsing m => m ModuleRenaming # | |
Parsec MungedPackageId |
|
Defined in Distribution.Types.MungedPackageId parsec :: CabalParsing m => m MungedPackageId # | |
Parsec MungedPackageName |
|
Defined in Distribution.Types.MungedPackageName parsec :: CabalParsing m => m MungedPackageName # | |
Parsec PackageIdentifier |
Note: Stricter than
|
Defined in Distribution.Types.PackageId parsec :: CabalParsing m => m PackageIdentifier # | |
Parsec PackageName | |
Defined in Distribution.Types.PackageName parsec :: CabalParsing m => m PackageName # | |
Parsec PackageVersionConstraint |
|
Defined in Distribution.Types.PackageVersionConstraint parsec :: CabalParsing m => m PackageVersionConstraint # | |
Parsec PkgconfigDependency | |
Defined in Distribution.Types.PkgconfigDependency parsec :: CabalParsing m => m PkgconfigDependency # | |
Parsec PkgconfigName | |
Defined in Distribution.Types.PkgconfigName parsec :: CabalParsing m => m PkgconfigName # | |
Parsec PkgconfigVersion |
|
Defined in Distribution.Types.PkgconfigVersion parsec :: CabalParsing m => m PkgconfigVersion # | |
Parsec PkgconfigVersionRange | |
Defined in Distribution.Types.PkgconfigVersionRange parsec :: CabalParsing m => m PkgconfigVersionRange # | |
Parsec KnownRepoType | |
Defined in Distribution.Types.SourceRepo parsec :: CabalParsing m => m KnownRepoType # | |
Parsec RepoKind | |
Defined in Distribution.Types.SourceRepo parsec :: CabalParsing m => m RepoKind # | |
Parsec RepoType | |
Defined in Distribution.Types.SourceRepo parsec :: CabalParsing m => m RepoType # | |
Parsec TestType | |
Defined in Distribution.Types.TestType parsec :: CabalParsing m => m TestType # | |
Parsec DefUnitId | |
Defined in Distribution.Types.UnitId parsec :: CabalParsing m => m DefUnitId # | |
Parsec UnitId | The textual format for |
Defined in Distribution.Types.UnitId parsec :: CabalParsing m => m UnitId # | |
Parsec UnqualComponentName | |
Defined in Distribution.Types.UnqualComponentName parsec :: CabalParsing m => m UnqualComponentName # | |
Parsec Version | |
Defined in Distribution.Types.Version parsec :: CabalParsing m => m Version # | |
Parsec VersionRange |
Small history:
Set operations are introduced in 3.0
Operators are introduced in 1.8. Issues only a warning.
Wild-version ranges are introduced in 1.6. Issues only a warning.
|
Defined in Distribution.Types.VersionRange.Internal parsec :: CabalParsing m => m VersionRange # | |
Parsec Extension | |
Defined in Language.Haskell.Extension parsec :: CabalParsing m => m Extension # | |
Parsec Language | |
Defined in Language.Haskell.Extension parsec :: CabalParsing m => m Language # | |
Parsec InstallOutcome Source # | |
Defined in Distribution.Client.BuildReports.Types parsec :: CabalParsing m => m InstallOutcome # | |
Parsec Outcome Source # | |
Defined in Distribution.Client.BuildReports.Types parsec :: CabalParsing m => m Outcome # | |
Parsec ReportLevel Source # | |
Defined in Distribution.Client.BuildReports.Types parsec :: CabalParsing m => m ReportLevel # | |
Parsec PreSolver Source # | |
Defined in Distribution.Client.Dependency.Types parsec :: CabalParsing m => m PreSolver # | |
Parsec ActiveRepoEntry Source # | |
Defined in Distribution.Client.IndexUtils.ActiveRepos parsec :: CabalParsing m => m ActiveRepoEntry # | |
Parsec ActiveRepos Source # | Note: empty string is not valid
|
Defined in Distribution.Client.IndexUtils.ActiveRepos parsec :: CabalParsing m => m ActiveRepos # | |
Parsec CombineStrategy Source # | |
Defined in Distribution.Client.IndexUtils.ActiveRepos parsec :: CabalParsing m => m CombineStrategy # | |
Parsec RepoIndexState Source # | |
Defined in Distribution.Client.IndexUtils.IndexState parsec :: CabalParsing m => m RepoIndexState # | |
Parsec TotalIndexState Source # |
|
Defined in Distribution.Client.IndexUtils.IndexState parsec :: CabalParsing m => m TotalIndexState # | |
Parsec Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp parsec :: CabalParsing m => m Timestamp # | |
Parsec UserConstraint Source # | |
Defined in Distribution.Client.Targets parsec :: CabalParsing m => m UserConstraint # | |
Parsec RelaxDepSubject Source # | |
Defined in Distribution.Client.Types.AllowNewer parsec :: CabalParsing m => m RelaxDepSubject # | |
Parsec RelaxDeps Source # |
This is not a glitch, even it looks like:
|
Defined in Distribution.Client.Types.AllowNewer parsec :: CabalParsing m => m RelaxDeps # | |
Parsec RelaxedDep Source # | |
Defined in Distribution.Client.Types.AllowNewer parsec :: CabalParsing m => m RelaxedDep # | |
Parsec InstallMethod Source # | |
Defined in Distribution.Client.Types.InstallMethod parsec :: CabalParsing m => m InstallMethod # | |
Parsec OverwritePolicy Source # | |
Defined in Distribution.Client.Types.OverwritePolicy parsec :: CabalParsing m => m OverwritePolicy # | |
Parsec LocalRepo Source # | Note: doesn't parse |
Defined in Distribution.Client.Types.Repo parsec :: CabalParsing m => m LocalRepo # | |
Parsec RemoteRepo Source # | Note: serialised format represents |
Defined in Distribution.Client.Types.Repo parsec :: CabalParsing m => m RemoteRepo # | |
Parsec RepoName Source # |
|
Defined in Distribution.Client.Types.RepoName parsec :: CabalParsing m => m RepoName # | |
Parsec OnlyConstrained | |
Defined in Distribution.Solver.Types.Settings parsec :: CabalParsing m => m OnlyConstrained # | |
Parsec Bool | |
Defined in Distribution.Parsec parsec :: CabalParsing m => m Bool # | |
FieldGrammar Parsec ParsecFieldGrammar | |
Defined in Distribution.FieldGrammar.Parsec blurFieldGrammar :: ALens' a b -> ParsecFieldGrammar b d -> ParsecFieldGrammar a d # uniqueFieldAla :: (Parsec b, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> ParsecFieldGrammar s a # booleanFieldDef :: FieldName -> ALens' s Bool -> Bool -> ParsecFieldGrammar s Bool # optionalFieldAla :: (Parsec b, Newtype a b) => FieldName -> (a -> b) -> ALens' s (Maybe a) -> ParsecFieldGrammar s (Maybe a) # optionalFieldDefAla :: (Parsec b, Newtype a b, Eq a) => FieldName -> (a -> b) -> ALens' s a -> a -> ParsecFieldGrammar s a # freeTextField :: FieldName -> ALens' s (Maybe String) -> ParsecFieldGrammar s (Maybe String) # freeTextFieldDef :: FieldName -> ALens' s String -> ParsecFieldGrammar s String # freeTextFieldDefST :: FieldName -> ALens' s ShortText -> ParsecFieldGrammar s ShortText # monoidalFieldAla :: (Parsec b, Monoid a, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> ParsecFieldGrammar s a # prefixedFields :: FieldName -> ALens' s [(String, String)] -> ParsecFieldGrammar s [(String, String)] # knownField :: FieldName -> ParsecFieldGrammar s () # hiddenField :: ParsecFieldGrammar s a -> ParsecFieldGrammar s a # deprecatedSince :: CabalSpecVersion -> String -> ParsecFieldGrammar s a -> ParsecFieldGrammar s a # removedIn :: CabalSpecVersion -> String -> ParsecFieldGrammar s a -> ParsecFieldGrammar s a # availableSince :: CabalSpecVersion -> a -> ParsecFieldGrammar s a -> ParsecFieldGrammar s a # availableSinceWarn :: CabalSpecVersion -> ParsecFieldGrammar s a -> ParsecFieldGrammar s a # | |
Parsec a => Parsec (MQuoted a) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (MQuoted a) # | |
Parsec a => Parsec (Identity a) | |
Defined in Distribution.Parsec parsec :: CabalParsing m => m (Identity a) # | |
Parsec (RelativePathNT from to) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (RelativePathNT from to) # | |
Parsec (SymbolicPathNT from to) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (SymbolicPathNT from to) # | |
(Newtype a b, Sep sep, Parsec b) => Parsec (List sep b a) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (List sep b a) # | |
(Newtype a b, Sep sep, Parsec b) => Parsec (NonEmpty' sep b a) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (NonEmpty' sep b a) # | |
(Newtype a b, Ord a, Sep sep, Parsec b) => Parsec (Set' sep b a) | |
Defined in Distribution.FieldGrammar.Newtypes parsec :: CabalParsing m => m (Set' sep b a) # | |
Parsec (SymbolicPathX 'AllowAbsolute from to) | |
Defined in Distribution.Utils.Path parsec :: CabalParsing m => m (SymbolicPathX 'AllowAbsolute from to) # | |
Parsec (SymbolicPathX 'OnlyRelative from to) | |
Defined in Distribution.Utils.Path parsec :: CabalParsing m => m (SymbolicPathX 'OnlyRelative from to) # |
prettyShow :: Pretty a => a -> String #
simpleParsec :: Parsec a => String -> Maybe a #
Parse a String
with lexemeParsec
.
eitherParsec :: Parsec a => String -> Either String a #
Parse a String
with lexemeParsec
.
explicitEitherParsec :: ParsecParser a -> String -> Either String a #
Parse a String
with given ParsecParser
. Trailing whitespace is accepted.