Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype SourceMap = SourceMap {}
- newtype WithSourceMap a = WithSourceMap {
- unWithSourceMap :: State (Maybe Text, SourceMap) a
- runWithSourceMap :: (Show a, Monoid a) => WithSourceMap a -> (a, SourceMap)
- addName :: Text -> WithSourceMap ()
Documentation
A map from source positions to a pair of sequences: first, elements that start at that position; then, elements that end at that position.
newtype WithSourceMap a Source #
Use this when you want to extract a source map as well as the parsed content.
WithSourceMap | |
|
Instances
runWithSourceMap :: (Show a, Monoid a) => WithSourceMap a -> (a, SourceMap) Source #
Extract a parsed value and a source map from a
WithSourceMap
.
addName :: Text -> WithSourceMap () Source #