boomerang-1.4.5.3: Library for invertible parsing and printing

Safe HaskellNone
LanguageHaskell98

Text.Boomerang.Pos

Synopsis

Documentation

type family Pos err :: * Source #

type synonym family that maps an error type to its position type

Instances

type Pos (ParserError p) Source # 
type Pos (ParserError p) = p

class InitialPosition e where Source #

the initial position for a position type

Minimal complete definition

initialPos

Methods

initialPos :: Maybe e -> Pos e Source #

class ErrorPosition err where Source #

extract the position information from an error

Minimal complete definition

getPosition

Methods

getPosition :: err -> Maybe (Pos err) Source #

data MajorMinorPos Source #

A basic 2-axis position type (e.g. line, character)

Constructors

MajorMinorPos 

Fields

Instances

Eq MajorMinorPos Source # 
Data MajorMinorPos Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MajorMinorPos -> c MajorMinorPos #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MajorMinorPos #

toConstr :: MajorMinorPos -> Constr #

dataTypeOf :: MajorMinorPos -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c MajorMinorPos) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MajorMinorPos) #

gmapT :: (forall b. Data b => b -> b) -> MajorMinorPos -> MajorMinorPos #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MajorMinorPos -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MajorMinorPos -> r #

gmapQ :: (forall d. Data d => d -> u) -> MajorMinorPos -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MajorMinorPos -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MajorMinorPos -> m MajorMinorPos #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MajorMinorPos -> m MajorMinorPos #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MajorMinorPos -> m MajorMinorPos #

Ord MajorMinorPos Source # 
Show MajorMinorPos Source # 

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