Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- parseCabalFileContents :: ByteString -> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription)
- type FilePath = String
- data NonEmpty a = a :| [a]
- data PWarning = PWarning !PWarnType !Position String
- data Version
- data PError = PError Position String
- data Position = Position !Int !Int
- data GenericPackageDescription = GenericPackageDescription {
- packageDescription :: PackageDescription
- gpdScannedVersion :: Maybe Version
- genPackageFlags :: [PackageFlag]
- condLibrary :: Maybe (CondTree ConfVar [Dependency] Library)
- condSubLibraries :: [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
- condForeignLibs :: [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
- condExecutables :: [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
- condTestSuites :: [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
- condBenchmarks :: [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
Documentation
parseCabalFileContents Source #
:: ByteString | UTF-8 encoded bytestring |
-> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription) |
Re-exports
File and directory names are values of type String
, whose precise
meaning is operating system dependent. Files can be opened, yielding a
handle which can then be used to operate on the contents of that file.
Non-empty (and non-strict) list type.
Since: base-4.9.0.0
a :| [a] infixr 5 |
Instances
Parser warning.
Instances
Generic PWarning | |
Show PWarning | |
Binary PWarning | |
NFData PWarning | |
Defined in Distribution.Parsec.Warning | |
Eq PWarning | |
Ord PWarning | |
Defined in Distribution.Parsec.Warning | |
type Rep PWarning | |
Defined in Distribution.Parsec.Warning type Rep PWarning = D1 ('MetaData "PWarning" "Distribution.Parsec.Warning" "Cabal-syntax-3.10.1.0" 'False) (C1 ('MetaCons "PWarning" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PWarnType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) |
A Version
represents the version of a software entity.
Instances of Eq
and Ord
are provided, which gives exact
equality and lexicographic ordering of the version number
components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).
This type is opaque and distinct from the Version
type in
Data.Version since Cabal-2.0
. The difference extends to the
Binary
instance using a different (and more compact) encoding.
Since: Cabal-syntax-2.0.0.2
Instances
Parser error.
Instances
Generic PError | |
Show PError | |
Binary PError | |
NFData PError | |
Defined in Distribution.Parsec.Error | |
type Rep PError | |
Defined in Distribution.Parsec.Error type Rep PError = D1 ('MetaData "PError" "Distribution.Parsec.Error" "Cabal-syntax-3.10.1.0" 'False) (C1 ('MetaCons "PError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) |
1-indexed row and column positions in a file.
Instances
Generic Position | |
Show Position | |
Binary Position | |
NFData Position | |
Defined in Distribution.Parsec.Position | |
Eq Position | |
Ord Position | |
Defined in Distribution.Parsec.Position | |
type Rep Position | |
Defined in Distribution.Parsec.Position type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-syntax-3.10.1.0" 'False) (C1 ('MetaCons "Position" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int))) |
data GenericPackageDescription #
GenericPackageDescription | |
|