Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module converts range templates into source templates. Basically it reads the source file and attaches parts of the source file to the AST elements that have the range of the given source code fragment.
- rangeToSource :: SourceInfoTraversal node => StringBuffer -> Ann node dom RngTemplateStage -> Ann node dom SrcTemplateStage
- getLocIndices :: SourceInfoTraversal e => Ann e dom RngTemplateStage -> Map OrdSrcSpan Int
- mapLocIndices :: Ord k => StringBuffer -> Map OrdSrcSpan k -> Map k String
- applyFragments :: SourceInfoTraversal node => [String] -> Ann node dom RngTemplateStage -> Ann node dom SrcTemplateStage
Documentation
rangeToSource :: SourceInfoTraversal node => StringBuffer -> Ann node dom RngTemplateStage -> Ann node dom SrcTemplateStage Source #
getLocIndices :: SourceInfoTraversal e => Ann e dom RngTemplateStage -> Map OrdSrcSpan Int Source #
Assigns an index (in the order they are used) for each range
mapLocIndices :: Ord k => StringBuffer -> Map OrdSrcSpan k -> Map k String Source #
Partitions the source file in the order where the parts are used in the AST
applyFragments :: SourceInfoTraversal node => [String] -> Ann node dom RngTemplateStage -> Ann node dom SrcTemplateStage Source #
Replaces the ranges in the AST with the source file parts