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

Safe HaskellNone

Language.Haskell.TokenUtils.DualTree

Contents

Synopsis

Documentation

type SourceTree a = DUALTree Transformation (Up a) Annot (Prim a)Source

The main data structure for this module

data Line a Source

Constructors

Line Row Col RowOffset Source LineOpt [a] 

Instances

IsToken a => Show (Line a) 
IsToken a => Outputable (Line a) 

to enable pretty printing

data LineOpt Source

Constructors

ONone 
OGroup

This line needs to be grouped with the next in terms of layout, so any column offsets need to be propagated

data Up a Source

The value that bubbles up. This is the Span occupied by the subtree, together with a string representation of the subtree. The origin of the string is the start of the span.