Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module containing small types
Synopsis
- data PError = PError Position String
- showPError :: FilePath -> PError -> String
- data PWarning = PWarning !PWarnType !Position String
- data PWarnType
- = PWTOther
- | PWTUTF
- | PWTBoolCase
- | PWTVersionTag
- | PWTNewSyntax
- | PWTOldSyntax
- | PWTDeprecatedField
- | PWTInvalidSubsection
- | PWTUnknownField
- | PWTUnknownSection
- | PWTTrailingFields
- | PWTExtraMainIs
- | PWTExtraTestModule
- | PWTExtraBenchmarkModule
- | PWTLexNBSP
- | PWTLexBOM
- | PWTLexTab
- | PWTQuirkyCabalFile
- | PWTDoubleDash
- | PWTMultipleSingularField
- | PWTBuildTypeDefault
- | PWTVersionLeadingZeros
- showPWarning :: FilePath -> PWarning -> String
- data Position = Position !Int !Int
- incPos :: Int -> Position -> Position
- retPos :: Position -> Position
- showPos :: Position -> String
- zeroPos :: Position
Diagnostics
Parser error.
Instances
Show PError Source # | |
Generic PError Source # | |
Binary PError Source # | |
NFData PError Source # | |
Defined in Distribution.Parsec.Common | |
type Rep PError Source # | |
Defined in Distribution.Parsec.Common type Rep PError = D1 (MetaData "PError" "Distribution.Parsec.Common" "Cabal-2.4.1.0-B0ZPupqxKZe72LoceK3cGA" 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))) |
Parser warning.
Instances
Show PWarning Source # | |
Generic PWarning Source # | |
Binary PWarning Source # | |
NFData PWarning Source # | |
Defined in Distribution.Parsec.Common | |
type Rep PWarning Source # | |
Defined in Distribution.Parsec.Common type Rep PWarning = D1 (MetaData "PWarning" "Distribution.Parsec.Common" "Cabal-2.4.1.0-B0ZPupqxKZe72LoceK3cGA" 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)))) |
Type of parser warning. We do classify warnings.
Different application may decide not to show some, or have fatal behaviour on others
PWTOther | Unclassified warning |
PWTUTF | Invalid UTF encoding |
PWTBoolCase |
|
PWTVersionTag | there are version with tags |
PWTNewSyntax | New syntax used, but no |
PWTOldSyntax | Old syntax used, and |
PWTDeprecatedField | |
PWTInvalidSubsection | |
PWTUnknownField | |
PWTUnknownSection | |
PWTTrailingFields | |
PWTExtraMainIs | extra main-is field |
PWTExtraTestModule | extra test-module field |
PWTExtraBenchmarkModule | extra benchmark-module field |
PWTLexNBSP | |
PWTLexBOM | |
PWTLexTab | |
PWTQuirkyCabalFile | legacy cabal file that we know how to patch |
PWTDoubleDash | Double dash token, most likely it's a mistake - it's not a comment |
PWTMultipleSingularField | e.g. name or version should be specified only once. |
PWTBuildTypeDefault | Workaround for derive-package having build-type: Default. See https://github.com/haskell/cabal/issues/5020. |
PWTVersionLeadingZeros | See https://github.com/haskell-infra/hackage-trustees/issues/128 |
Instances
Position
1-indexed row and column positions in a file.
Instances
Eq Position Source # | |
Ord Position Source # | |
Defined in Distribution.Parsec.Common | |
Show Position Source # | |
Generic Position Source # | |
Binary Position Source # | |
NFData Position Source # | |
Defined in Distribution.Parsec.Common | |
type Rep Position Source # | |
Defined in Distribution.Parsec.Common type Rep Position = D1 (MetaData "Position" "Distribution.Parsec.Common" "Cabal-2.4.1.0-B0ZPupqxKZe72LoceK3cGA" False) (C1 (MetaCons "Position" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Int))) |