-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Sums/products/lists/trees which can be extended in other modules -- -- Extensible lists: Add to a list at compile-time in many modules, which -- do not necessarily know each other, and then collect it into a single -- list in a module depending on all of them (possibly indirectly). -- -- Extensible products: It is a record in which new fields can be added -- anywhere including in different modules; dependent defaults are -- supported, so it is still possible to make a value of such a type. -- -- Extensible sums: Type with choices; new choices can be added anywhere -- including in other modules (which do not need to know each other). The -- operations on them are also freely extensible in the similar way. -- -- Extensible trees: You can make a tree out of types, and have a value -- at each node. New nodes can be added anywhere if you have access to -- the node which will become the new node's parent. @package extensible-data @version 0.1.0.4 module Data.Extensible.List class ExtList v p | p -> v extListContents :: ExtList v p => (p, [v]) extList :: Name -> Q Exp module Data.Extensible.Product data ExtProd p class Typeable x => ExtProdC p x | x -> p where type family ExtProdF x :: * defaultExtProd :: ExtProdC p x => x -> p -> ExtProdF x data ProdConstructor p (:*=) :: x -> ExtProdF x -> ProdConstructor p emptyExtProd :: p -> ExtProd p getExtProd :: ExtProdC p x => ExtProd p -> x -> ExtProdF x putExtProd :: ExtProdC p x => ExtProd p -> x -> ExtProdF x -> ExtProd p lensExtProd :: ExtProdC p x => x -> Lens (ExtProd p) (ExtProdF x) constructExtProd :: p -> [ProdConstructor p] -> ExtProd p instance Typeable1 ExtProd module Data.Extensible.Sum data ExtSum s ExtSum :: x -> ExtSumF x -> ExtSum s class (Eq x, Typeable x) => ExtSumC s x | x -> s where type family ExtSumF x :: * accessExtSum :: ExtSumC s x => x -> ExtSumF x -> (s, s -> x) data SumSelector s v (:+?) :: x -> (ExtSumF x -> v) -> SumSelector s v callExtSum :: ExtSum s -> s nextExtSum :: (s -> s) -> ExtSum s -> ExtSum s castExtSum :: ExtSumC s x => ExtSum s -> x -> Maybe (ExtSumF x) selectExtSum :: [SumSelector s v] -> ExtSum s -> Maybe v lensExtSum :: Lens (ExtSum s) s instance Typeable1 ExtSum module Data.Extensible.Tree data ExtTreeData v p c ExtRoot :: ExtTreeData v p p ExtNode :: (c -> (v, p)) -> ExtTreeData v p c class Typeable c => ExtTree v p c | c -> p, p -> v treeData :: ExtTree v p c => ExtTreeData v p c normalChild :: ExtTree v p c => p -> c traceExtTree :: ExtTree v p c => c -> [v] normalParent :: ExtTree v p c => c -> p makeExtRoot :: Q Type -> Q Type -> Q [Dec] data ExtTreeNode v ExtTreeNode :: c -> ExtTreeNode v extAncestor :: (Typeable p, ExtTree v pp c) => c -> Maybe p extAncestorAny :: Typeable p => ExtTreeNode v -> Maybe p