Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- type family Pos err :: *
- class InitialPosition e where
- initialPos :: Maybe e -> Pos e
- class ErrorPosition err where
- getPosition :: err -> Maybe (Pos err)
- data MajorMinorPos = MajorMinorPos {}
- incMajor :: Integral i => i -> MajorMinorPos -> MajorMinorPos
- incMinor :: Integral i => i -> MajorMinorPos -> MajorMinorPos
Documentation
type family Pos err :: * Source #
type synonym family that maps an error type to its position type
Instances
type Pos (ParserError p) Source # | |
Defined in Text.Boomerang.Error |
class InitialPosition e where Source #
the initial position for a position type
initialPos :: Maybe e -> Pos e Source #
Instances
InitialPosition StringsError Source # | |
Defined in Text.Boomerang.Strings | |
InitialPosition StringError Source # | |
Defined in Text.Boomerang.String initialPos :: Maybe StringError -> Pos StringError Source # | |
InitialPosition TextsError Source # | |
Defined in Text.Boomerang.Texts initialPos :: Maybe TextsError -> Pos TextsError Source # |
class ErrorPosition err where Source #
extract the position information from an error
getPosition :: err -> Maybe (Pos err) Source #
Instances
ErrorPosition (ParserError p) Source # | |
Defined in Text.Boomerang.Error getPosition :: ParserError p -> Maybe (Pos (ParserError p)) Source # |
data MajorMinorPos Source #
A basic 2-axis position type (e.g. line, character)
Instances
incMajor :: Integral i => i -> MajorMinorPos -> MajorMinorPos Source #
increment major position by i
, reset minor position to 0..
if you wanted something else.. too bad.
incMinor :: Integral i => i -> MajorMinorPos -> MajorMinorPos Source #
increment minor position by i