Safe Haskell | None |
---|
- renderLayoutTree :: IsToken a => LayoutTree a -> String
- 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
- = Ann String
- | ADeleted ForestSpan RowOffset SimpPos
- | ASubtree ForestSpan
- data DeletedSpan = DeletedSpan SimpSpan 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 DtSimpSpan Alignment (NonEmpty (Line a)) [DeletedSpan]
- | UDeleted [DeletedSpan]
Documentation
renderLayoutTree :: IsToken a => LayoutTree a -> StringSource
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
IsToken a => Show (Line a) | |
IsToken a => Outputable (Line a) | |
Outputable (Line GhcPosToken) | Extract the layout-sensitive parts of the GHC AST. |
Eq Source | |
Show Source | |
Outputable Source | |
Outputable Source |
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
Eq DeletedSpan | |
Show DeletedSpan | |
Outputable DeletedSpan |
ONone | |
OGroup | This line needs to be grouped with the next in terms of layout, so any column offsets need to be propagated |
Eq LineOpt | |
Show LineOpt | |
Outputable LineOpt | |
Outputable LineOpt |
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 DtSimpSpan 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)) |