Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
ASTText Text | Text. |
ASTs AST AST | Branching |
ASTProp Property AST | Some property that does not change the visible size of the inner AST. |
ASTShape Shape | Some shape ( |
ASTPadding Int Padding AST | |
EmptyAST |
Instances
Represents (possibly partial) result of splitAST
computation.
EmptyL a | a split with empty LHS tree. |
EmptyR a Int | a split that has no RHS tree. |
Twain a a Int | a split with left side's length guaranteed to be equal to the given number (third constructor's argument). |
(=>>) :: Semigroup a => Split a -> Split a -> Split a Source #
Join results of two (maybe partial) splits.
Example:
-- read as "incomplete split with empty RHS and some LHS l of length n
-- joined together with a complete split with LHS
a
of length n' and some
-- RHS b
is a complete split with LHS equal to (l <> a) with length (n + n')
-- and RHS equal to b
".
EmptyR l n =>> Twain a b n'
= Twain (l <> a) b (n + n')