haskell-token-utils-0.0.0.6: Utilities to tie up tokens to an AST

Safe HaskellNone

Language.Haskell.TokenUtils.GHC.Layout

Contents

Description

 

Synopsis

Documentation

mkToken :: Token -> SimpPos -> String -> GhcPosTokenSource

Compose a new token using the given arguments.

Span conversion functions

gs2f :: SrcSpan -> ForestSpanSource

f2gs :: ForestSpan -> SrcSpanSource

gs2ss :: SrcSpan -> SimpSpanSource

ss2gs :: SimpSpan -> SrcSpanSource

insertForestLineInSrcSpan :: ForestLine -> SrcSpan -> SrcSpanSource

Replace any ForestLine flags already in a SrcSpan with the given ones TODO ++AZ++ : should not be required, convert to SimSpan then use that

showSrcSpan :: SrcSpan -> StringSource

showSrcSpanF :: SrcSpan -> StringSource

newNameTok :: Bool -> SrcSpan -> Name -> GhcPosTokenSource

Create a new name token. If useQual then use the qualified name, if it exists. The end position is not changed, so the eventual realignment can know what the difference in length in the token is

type GhcPosToken = (Located Token, String)Source

For testing