Safe Haskell | None |
---|---|

Language | Haskell2010 |

Binary tree, useful to build *Abstract Syntax Tree* (AST)
made of applications of tokens.

# Type

`BinTree`

*Binary Tree*.

## Instances

Monad BinTree Source # | |

Functor BinTree Source # | |

Applicative BinTree Source # | |

Foldable BinTree Source # | |

Defined in Language.Symantic.Grammar.BinTree fold :: Monoid m => BinTree m -> m # foldMap :: Monoid m => (a -> m) -> BinTree a -> m # foldr :: (a -> b -> b) -> b -> BinTree a -> b # foldr' :: (a -> b -> b) -> b -> BinTree a -> b # foldl :: (b -> a -> b) -> b -> BinTree a -> b # foldl' :: (b -> a -> b) -> b -> BinTree a -> b # foldr1 :: (a -> a -> a) -> BinTree a -> a # foldl1 :: (a -> a -> a) -> BinTree a -> a # elem :: Eq a => a -> BinTree a -> Bool # maximum :: Ord a => BinTree a -> a # minimum :: Ord a => BinTree a -> a # | |

Traversable BinTree Source # | |

Eq a => Eq (BinTree a) Source # | |

Show a => Show (BinTree a) Source # | |

Semigroup (BinTree a) Source # | |

collapseBT :: (a -> a -> a) -> BinTree a -> a Source #

Collapse depth-first given `BinTree`

with given function.

Useful to apply all arguments.