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

Safe HaskellSafe-Inferred

Language.Haskell.TokenUtils.TokenUtils

Synopsis

Documentation

replaceTokenForSrcSpan :: IsToken a => Tree (Entry a) -> Span -> a -> Tree (Entry a)Source

Replace a single token in a token tree, without changing the structure of the tree NOTE: the GHC.SrcSpan may have been used to select the appropriate forest in the first place, and is required to select the correct span in the tree, due to the ForestLine annotations that may be present