 | haskell-src-exts-1.9.6: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer | Contents | Index |
|
| Language.Haskell.Exts.SrcLoc | | Portability | portable | | Stability | stable | | Maintainer | Niklas Broberg, d00nibro@chalmers.se |
|
|
|
| Description |
| This module defines various data types representing source location
information, of varying degree of preciseness.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data SrcLoc |
| A single position in the source.
| | Constructors | | Instances | |
|
|
| data SrcSpan |
| A portion of the source, spanning one or more lines and zero or more columns.
| | Constructors | | SrcSpan | | | srcSpanFilename :: String | | | srcSpanStartLine :: Int | | | srcSpanStartColumn :: Int | | | srcSpanEndLine :: Int | | | srcSpanEndColumn :: Int | |
|
| Instances | |
|
|
| srcSpanStart :: SrcSpan -> (Int, Int) |
| Returns srcSpanStartLine and srcSpanStartColumn in a pair.
|
|
| srcSpanEnd :: SrcSpan -> (Int, Int) |
| Returns srcSpanEndLine and srcSpanEndColumn in a pair.
|
|
| mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan |
| Combine two locations in the source to denote a span.
|
|
| mergeSrcSpan :: SrcSpan -> SrcSpan -> SrcSpan |
| Merge two source spans into a single span from the start of the first
to the end of the second. Assumes that the two spans relate to the
same source file.
|
|
| isNullSpan :: SrcSpan -> Bool |
| Test if a given span starts and ends at the same location.
|
|
| data Loc a |
| An entity located in the source.
| | Constructors | | Instances | |
|
|
| data SrcSpanInfo |
| A portion of the source, extended with information on the position of entities within the span.
| | Constructors | | Instances | |
|
|
| noInfoSpan :: SrcSpan -> SrcSpanInfo |
| Generate a SrcSpanInfo with no positional information for entities.
|
|
| infoSpan :: SrcSpan -> [SrcSpan] -> SrcSpanInfo |
| Generate a SrcSpanInfo with the supplied positional information for entities.
|
|
| combSpanInfo :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo |
| Combine two SrcSpanInfos into one that spans the combined source area of
the two arguments, leaving positional information blank.
|
|
| (<++>) :: SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo |
| Short name for combSpanInfo
|
|
| (<+?>) :: SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo |
| Optionally combine the first argument with the second,
or return it unchanged if the second argument is Nothing.
|
|
| (<?+>) :: Maybe SrcSpanInfo -> SrcSpanInfo -> SrcSpanInfo |
| Optionally combine the second argument with the first,
or return it unchanged if the first argument is Nothing.
|
|
| (<**) :: SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo |
| Add more positional information for entities of a span.
|
|
| (<^^>) :: SrcSpan -> SrcSpan -> SrcSpanInfo |
| Merge two SrcSpans and lift them to a SrcInfoSpan with
no positional information for entities.
|
|
| class SrcInfo si where |
| A class to work over all kinds of source location information.
| | | Methods | | | Instances | |
|
|
| Produced by Haddock version 2.7.2 |