haskell-token-utils-0.0.0.4: 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

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

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

For testing