haskell-tools-ast-trf-0.1.2.0: Conversions on Haskell-Tools AST to prepare for refactorings

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.AnnTrf.RangeToRangeTemplate

Description

Transform a syntax tree with ranges to a syntax tree that has range templates. Cuts the ranges of children from the ranges of their parents and replaces it with placeholders.

Synopsis

Documentation

cutUpRanges :: forall node sema. StructuralTraversable node => Ann node (NodeInfo sema SpanInfo) -> Ann node (NodeInfo sema RangeTemplate) Source #

Creates a source template from the ranges and the input file. All source ranges must be good ranges.

fixRanges :: StructuralTraversable node => Ann node (NodeInfo sema SpanInfo) -> Ann node (NodeInfo sema SpanInfo) Source #

Modifies ranges to contain their children