loc-0.1.4.1: Line and column positions and ranges in text files
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Loc.SpanOrLoc

Synopsis

Documentation

data SpanOrLoc Source #

A SpanOrLoc consists of a start location and an end location. The end location must be greater than or equal to the start location; in other words, backwards spans are not permitted.

If the start and end location are the same, then the value is a SpanOrLoc. If they differ, then the value is a SpanOrLoc.

Instances

Instances details
Data SpanOrLoc Source # 
Instance details

Defined in Data.Loc.SpanOrLoc

Methods

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

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

toConstr :: SpanOrLoc -> Constr #

dataTypeOf :: SpanOrLoc -> DataType #

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

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

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

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

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

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

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

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

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

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

Show SpanOrLoc Source # 
Instance details

Defined in Data.Loc.SpanOrLoc

Eq SpanOrLoc Source # 
Instance details

Defined in Data.Loc.SpanOrLoc

Ord SpanOrLoc Source # 
Instance details

Defined in Data.Loc.SpanOrLoc

Constructing

fromTo :: Loc -> Loc -> SpanOrLoc Source #

Construct a SpanOrLoc from two SpanOrLocs. If the two locs are not equal, the lesser loc will be the start, and the greater loc will be the end.

Deconstructing

spanOrLoc :: (Span -> a) -> (Loc -> a) -> SpanOrLoc -> a Source #

Querying