boomerang-1.4.8: Library for invertible parsing and printing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Boomerang.Pos

Synopsis

Documentation

type family Pos err :: * Source #

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

Instances

Instances details
type Pos (ParserError p) Source # 
Instance details

Defined in Text.Boomerang.Error

type Pos (ParserError p) = p

class InitialPosition e where Source #

the initial position for a position type

Methods

initialPos :: Maybe e -> Pos e Source #

class ErrorPosition err where Source #

extract the position information from an error

Methods

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

Instances

Instances details
ErrorPosition (ParserError p) Source # 
Instance details

Defined in Text.Boomerang.Error

data MajorMinorPos Source #

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

Constructors

MajorMinorPos 

Fields

Instances

Instances details
Eq MajorMinorPos Source # 
Instance details

Defined in Text.Boomerang.Pos

Data MajorMinorPos Source # 
Instance details

Defined in Text.Boomerang.Pos

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 :: forall r r'. (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 # 
Instance details

Defined in Text.Boomerang.Pos

Show MajorMinorPos Source # 
Instance details

Defined in Text.Boomerang.Pos

InitialPosition StringsError Source # 
Instance details

Defined in Text.Boomerang.Strings

InitialPosition StringError Source # 
Instance details

Defined in Text.Boomerang.String

InitialPosition TextsError Source # 
Instance details

Defined in Text.Boomerang.Texts

a ~ b => IsString (Boomerang StringsError [String] a b) Source # 
Instance details

Defined in Text.Boomerang.Strings

a ~ b => IsString (Boomerang StringError String a b) Source # 
Instance details

Defined in Text.Boomerang.String

a ~ b => IsString (Boomerang TextsError [Text] a b) Source # 
Instance details

Defined in Text.Boomerang.Texts

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