Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Binrep.Get.Error
Description
Error data type definitions (shared between parsers).
Synopsis
- data E
- data EMiddle
- data EBase
- data EGeneric e
- = EGenericSum (EGenericSum e)
- | EGenericField String (Maybe String) Natural e
- data EGenericSum e
Documentation
Structured parse error.
Constructors
E Int EMiddle | |
EFail | Unhandled parse error. You get this if you don't change a flatparse fail to an error. Should not be set except by library code. |
Instances
Generic E Source # | |
Show E Source # | |
Eq E Source # | |
type Rep E Source # | |
Defined in Binrep.Get.Error type Rep E = D1 ('MetaData "E" "Binrep.Get.Error" "binrep-0.8.0-inplace" 'False) (C1 ('MetaCons "E" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EMiddle)) :+: C1 ('MetaCons "EFail" 'PrefixI 'False) (U1 :: Type -> Type)) |
Constructors
EBase EBase | Parse error with no further context. |
EAnd E EBase | Somehow, we got two parse errors. I have a feeling that seeing this indicates a problem in your code. |
EGeneric | Parse error decorated with generic info. Should not be set except by library code. |
Instances
Generic EMiddle Source # | |
Show EMiddle Source # | |
Eq EMiddle Source # | |
type Rep EMiddle Source # | |
Defined in Binrep.Get.Error type Rep EMiddle = D1 ('MetaData "EMiddle" "Binrep.Get.Error" "binrep-0.8.0-inplace" 'False) (C1 ('MetaCons "EBase" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EBase)) :+: (C1 ('MetaCons "EAnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 E) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EBase)) :+: C1 ('MetaCons "EGeneric" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (EGeneric E))))) |
Constructors
EExpectedByte Word8 Word8 | expected first, got second |
EOverlong Int Int | expected first, got second |
EExpected ByteString ByteString | expected first, got second |
EFailNamed String | known fail |
EFailParse String ByteString Word8 | parse fail (where you parse a larger object, then a smaller one in it) |
ERanOut Int | ran out of input, needed precisely Actually a |
Instances
A generic context layer for a parse error of type e
.
Recursive: parse errors occurring in fields are wrapped up here. (Those errors may also have a generic context layer.)
Making this explicitly recursive may seem strange, but it clarifies that this data type is to be seen as a layer over a top-level type.
Constructors
EGenericSum (EGenericSum e) | Parse error relating to sum types (constructors). |
EGenericField | Parse error in a constructor field. |
Instances
Generic (EGeneric e) Source # | |
Show e => Show (EGeneric e) Source # | |
Eq e => Eq (EGeneric e) Source # | |
type Rep (EGeneric e) Source # | |
Defined in Binrep.Get.Error type Rep (EGeneric e) = D1 ('MetaData "EGeneric" "Binrep.Get.Error" "binrep-0.8.0-inplace" 'False) (C1 ('MetaCons "EGenericSum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (EGenericSum e))) :+: C1 ('MetaCons "EGenericField" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)))) |
data EGenericSum e Source #
Constructors
EGenericSumTag e | Parse error parsing prefix tag. |
EGenericSumTagNoMatch | Unable to match a constructor to the parsed prefix tag. |