Copyright | (c) 2017 Kai-Oliver Prott |
---|---|
License | BSD-3-clause |
Maintainer | fte@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module implements a data type for span information for entities from a source file and function to operate on them. A span info consists of the span of the entity and a list of sub-spans whith additional information about location of keywords, e.g.
Documentation
SpanInfo | |
| |
NoSpanInfo |
class HasPosition a => HasSpanInfo a where Source #
getSpanInfo :: a -> SpanInfo Source #
setSpanInfo :: SpanInfo -> a -> a Source #
updateEndPos :: a -> a Source #
Instances
fromSrcSpan :: Span -> SpanInfo Source #
fromSrcSpanBoth :: Span -> SpanInfo Source #
getSrcSpan :: HasSpanInfo a => a -> Span Source #
setSrcSpan :: HasSpanInfo a => Span -> a -> a Source #
fromSrcInfoPoints :: [Span] -> SpanInfo Source #
getSrcInfoPoints :: HasSpanInfo a => a -> [Span] Source #
setSrcInfoPoints :: HasSpanInfo a => [Span] -> a -> a Source #
getStartPosition :: HasSpanInfo a => a -> Position Source #
getSrcSpanEnd :: HasSpanInfo a => a -> Position Source #
setStartPosition :: HasSpanInfo a => Position -> a -> a Source #
setEndPosition :: HasSpanInfo a => Position -> a -> a Source #
spanInfo2Pos :: HasSpanInfo a => a -> Position Source #