Copyright | (C) 2017 Maksymilian Owsianny |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Maksymilian.Owsianny@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
- data BinaryTree l n
- = Node (BinaryTree l n) !n (BinaryTree l n)
- | Leaf !l
- data LeafColor
- swapColor :: LeafColor -> LeafColor
- type BSP = BinaryTree LeafColor
- cmp :: BSP a -> BSP a
- pattern In :: forall a. BSP a
- pattern Out :: forall a. BSP a
- constructBSP :: Clip b v n => (Facet b v n -> c) -> [Facet b v n] -> BSP c
- splitWith :: (a -> (Maybe a, Maybe a)) -> [a] -> ([a], [a])
- destructBinaryTree :: BinaryTree l n -> [n]
- prettyBSP :: Ord f => BSP f -> IO ()
- renderH :: (Doc -> Doc) -> Context k -> BSP k -> Doc
- denormalizeBSP :: Ord n => BSP n -> (BSP Int, IntMap n)
Documentation
data BinaryTree l n Source #
Binary Tree parametrized by leafs and nodes
Node (BinaryTree l n) !n (BinaryTree l n) | |
Leaf !l |
Bifunctor BinaryTree Source # | |
Functor (BinaryTree l) Source # | |
(Eq l, Eq n) => Eq (BinaryTree l n) Source # | |
(Show l, Show n) => Show (BinaryTree l n) Source # | |
type BSP = BinaryTree LeafColor Source #
destructBinaryTree :: BinaryTree l n -> [n] Source #