| Copyright | © 2019 Vincent Archambault |
|---|---|
| License | 0BSD |
| Maintainer | Vincent Archambault <archambault.v@gmail.com> |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.SExpresso.Parse.Location
Description
The module Data.SExpresso.Parse re-exports the functions and datatypes of this module.
Synopsis
- data Location = Span SourcePos SourcePos
- data Located a = At Location a
- located :: (MonadParsec e s m, TraversableStream s) => m a -> m (Located a)
- startPosPretty :: Location -> String
- endPosPretty :: Location -> String
Documentation
The Location datatype represents a source span
The Located datatype adds a source span to the type a
Instances
| Functor Located Source # | |
| Show a => Show (Located a) Source # | |
| Eq a => Eq (Located a) Source # | |
| Ord a => Ord (Located a) Source # | |
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 object with Span S1 _sourcePosPretty
endPosPretty :: Location -> String Source #
Pretty prints S2 of a object with Span _ S2sourcePosPretty