Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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
type Pos (ParserError p) = p |
class InitialPosition e where Source
the initial position for a position type
initialPos :: Maybe e -> Pos e Source
class ErrorPosition err where Source
extract the position information from an error
getPosition :: err -> Maybe (Pos err) Source
data MajorMinorPos Source
A basic 2-axis position type (e.g. line, character)
Eq MajorMinorPos | |
Data MajorMinorPos | |
Ord MajorMinorPos | |
Show MajorMinorPos | |
InitialPosition StringError | |
InitialPosition StringsError | |
InitialPosition TextsError | |
Typeable * MajorMinorPos | |
(~) * a b => IsString (Boomerang StringError String a b) | |
(~) * a b => IsString (Boomerang StringsError [String] a b) | |
(~) * a b => IsString (Boomerang TextsError [Text] a b) |
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