Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
type MemoTable phi top ixs = HList (MemoTable' One phi top ixs) Source
type family MemoTable' x phi top ixs :: [*] Source
type MemoTable' x phi top ([] *) = [] * | |
type MemoTable' x phi top ((:) * t ts) = (:) * (MemCell x phi top t) (MemoTable' x phi top ts) |
runMemo :: forall phi top a. EmptyMemo phi top (Ixs phi) => Proxy `(phi, top)` -> Memo phi top a -> a Source
recMemo :: forall phi top ix. (Fam phi, Children phi (PF phi) ix, Lookup phi (Ixs phi) ix, Eq ix, GetChildrenTable phi (Ixs phi) ix) => (forall ix. (Children phi (PF phi) ix, Lookup phi (Ixs phi) ix, Eq ix, GetChildrenTable phi (Ixs phi) ix) => Bool -> phi ix -> ix -> ix -> Memo phi top [Insert phi top ix]) -> Bool -> phi ix -> ix -> ix -> Memo phi top [Insert phi top ix] Source
type ChildTable phi top ixs = MemoTable' Two phi top ixs Source
class ChildrenTable phi top ixs where Source
childrenTable :: Proxy `(phi, top, ixs)` -> top -> HList (ChildTable phi top ixs) Source
ChildrenTable phi top ([] *) | |
(Fam phi, El phi h, El phi top, Children phi (PF phi) h, ChildrenTable phi top t) => ChildrenTable phi top ((:) * h t) | |
(Fam phi, El phi top, Children phi (PF phi) top, ChildrenTable phi top t) => ChildrenTable phi top ((:) * top t) |
class GetChildrenTable phi ixs ix where Source
getChTable :: Proxy `(phi, top, ixs)` -> HList (ChildTable phi top ixs) -> MemCell Two phi top ix Source
GetChildrenTable phi ([] *) ix | |
GetChildrenTable phi ts ix => GetChildrenTable phi ((:) * t ts) ix | |
Ord t => GetChildrenTable phi ((:) * t ts) t |