sexpresso-1.2.0.0: A flexible library for parsing and printing S-expression
Copyright© 2019 Vincent Archambault
License0BSD
MaintainerVincent Archambault <archambault.v@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SExpresso.Parse.Location

Description

The module Data.SExpresso.Parse re-exports the functions and datatypes of this module.

Synopsis

Documentation

data Location Source #

The Location datatype represents a source span

Constructors

Span SourcePos SourcePos 

Instances

Instances details
Eq Location Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Ord Location Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Show Location Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

data Located a Source #

The Located datatype adds a source span to the type a

Constructors

At Location a 

Instances

Instances details
Functor Located Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Methods

fmap :: (a -> b) -> Located a -> Located b #

(<$) :: a -> Located b -> Located a #

Eq a => Eq (Located a) Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Methods

(==) :: Located a -> Located a -> Bool #

(/=) :: Located a -> Located a -> Bool #

Ord a => Ord (Located a) Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Methods

compare :: Located a -> Located a -> Ordering #

(<) :: Located a -> Located a -> Bool #

(<=) :: Located a -> Located a -> Bool #

(>) :: Located a -> Located a -> Bool #

(>=) :: Located a -> Located a -> Bool #

max :: Located a -> Located a -> Located a #

min :: Located a -> Located a -> Located a #

Show a => Show (Located a) Source # 
Instance details

Defined in Data.SExpresso.Parse.Location

Methods

showsPrec :: Int -> Located a -> ShowS #

show :: Located a -> String #

showList :: [Located a] -> ShowS #

located :: (MonadParsec e s m, TraversableStream s) => m a -> m (Located a) Source #

The located function adds a source span to a parser.

startPosPretty :: Location -> String Source #

Pretty prints S1 of a Span S1 _ object with sourcePosPretty

endPosPretty :: Location -> String Source #

Pretty prints S2 of a Span _ S2 object with sourcePosPretty