Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains utilities for calculating positions and offsets. While tokens are annotated with ranges, CST nodes are not, but they can be dynamically derived with the functions in this module, which will return the first and last tokens for a given node.
Documentation
type TokenRange = (SourceToken, SourceToken) Source #
widen :: SourceRange -> SourceRange -> SourceRange Source #
srcRange :: SourceToken -> SourceRange Source #
nameRange :: Name a -> TokenRange Source #
qualRange :: QualifiedName a -> TokenRange Source #
labelRange :: Label -> TokenRange Source #
wrappedRange :: Wrapped a -> TokenRange Source #
moduleRange :: Module a -> TokenRange Source #
exportRange :: Export a -> TokenRange Source #
importDeclRange :: ImportDecl a -> TokenRange Source #
importRange :: Import a -> TokenRange Source #
dataMembersRange :: DataMembers a -> TokenRange Source #
declRange :: Declaration a -> TokenRange Source #
dataHeadRange :: DataHead a -> TokenRange Source #
dataCtorRange :: DataCtor a -> TokenRange Source #
classHeadRange :: ClassHead a -> TokenRange Source #
instanceRange :: Instance a -> TokenRange Source #
instanceHeadRange :: InstanceHead a -> TokenRange Source #
foreignRange :: Foreign a -> TokenRange Source #
guardedRange :: Guarded a -> TokenRange Source #
guardedExprRange :: GuardedExpr a -> TokenRange Source #
whereRange :: Where a -> TokenRange Source #
kindRange :: Kind a -> TokenRange Source #
typeRange :: Type a -> TokenRange Source #
constraintRange :: Constraint a -> TokenRange Source #
exprRange :: Expr a -> TokenRange Source #
letBindingRange :: LetBinding a -> TokenRange Source #
doStatementRange :: DoStatement a -> TokenRange Source #
binderRange :: Binder a -> TokenRange Source #
recordUpdateRange :: RecordUpdate a -> TokenRange Source #
recordLabeledExprRange :: RecordLabeled (Expr a) -> TokenRange Source #