Safe Haskell | None |
---|
- layoutTreeToSourceTree :: IsToken a => LayoutTree a -> SourceTree a
- retrieveLinesFromLayoutTree :: IsToken a => LayoutTree a -> [Line a]
- retrieveLines :: IsToken a => SourceTree a -> [Line a]
- renderLines :: IsToken a => [Line a] -> String
- renderSourceTree :: IsToken a => SourceTree a -> String
- type SourceTree a = DUALTree Transformation (Up a) Annot (Prim a)
- data Line a = Line Row Col RowOffset Source LineOpt [a]
- data Source
- renderLinesFromLayoutTree :: IsToken a => LayoutTree a -> String
- data Alignment
- data Annot
- data DeletedSpan = DeletedSpan Span RowOffset SimpPos
- data LineOpt
- data Prim a
- = PToks [a]
- | PDeleted ForestSpan RowOffset SimpPos
- data Transformation = TAbove ColOffset EndOffset (Row, Col) (Row, Col) EndOffset
- data Up a
- = Up Span Alignment (NonEmpty (Line a)) [DeletedSpan]
- | UDeleted [DeletedSpan]
Documentation
layoutTreeToSourceTree :: IsToken a => LayoutTree a -> SourceTree aSource
retrieveLinesFromLayoutTree :: IsToken a => LayoutTree a -> [Line a]Source
retrieveLines :: IsToken a => SourceTree a -> [Line a]Source
renderLines :: IsToken a => [Line a] -> StringSource
renderSourceTree :: IsToken a => SourceTree a -> StringSource
type SourceTree a = DUALTree Transformation (Up a) Annot (Prim a)Source
The main data structure for this module
renderLinesFromLayoutTree :: IsToken a => LayoutTree a -> StringSource
to enable pretty printing
Show Annot | |
Outputable Annot | |
IsToken a => Outputable (SourceTree a) | |
IsToken a => Outputable (DUALTreeNE Transformation (Up a) Annot (Prim a)) | |
IsToken a => Outputable (DUALTreeU Transformation (Up a) Annot (Prim a)) |
data DeletedSpan Source
Show a => Show (Prim a) | |
IsToken a => Outputable (SourceTree a) | |
IsToken a => Outputable (Prim a) | |
IsToken a => Outputable (DUALTreeNE Transformation (Up a) Annot (Prim a)) | |
IsToken a => Outputable (DUALTreeU Transformation (Up a) Annot (Prim a)) |
data Transformation Source
Show Transformation | |
Semigroup Transformation | |
Outputable Transformation | |
Action Transformation (Up a) | |
IsToken a => Outputable (SourceTree a) | |
IsToken a => Outputable (DUALTreeNE Transformation (Up a) Annot (Prim a)) | |
IsToken a => Outputable (DUALTreeU Transformation (Up a) Annot (Prim a)) |
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.
Up Span Alignment (NonEmpty (Line a)) [DeletedSpan] | |
UDeleted [DeletedSpan] |
Action Transformation (Up a) | |
IsToken a => Show (Up a) | |
IsToken a => Semigroup (Up a) | |
IsToken a => Outputable (SourceTree a) | |
IsToken a => Outputable (Up a) | |
IsToken a => Outputable (DUALTreeNE Transformation (Up a) Annot (Prim a)) | |
IsToken a => Outputable (DUALTreeU Transformation (Up a) Annot (Prim a)) |