Stability | experimental |
---|---|
Maintainer | conal@conal.net |
Safe Haskell | None |
Functor-based memo tries. See http://conal.net/blog/posts/details-for-nonstrict-memoization-part-1/
Documentation
class Functor (STrie k) => HasTrie k whereSource
Domain types with associated memo tries
sTrie :: (k -> v) -> k :-> vSource
Create the trie for the entire domain of a function
sUntrie :: HasLub v => (k :-> v) -> k -> vSource
Convert k trie to k function, i.e., access k field of the trie
HasTrie Bool | |
HasTrie Int | |
HasTrie Integer | |
HasTrie () | |
HasTrie a => HasTrie [a] | |
HasTrie a => HasTrie (Id a) | |
HasTrie a => HasTrie (Lift a) | |
(HasTrie a, HasTrie (:->: a b), HasLub b) => HasTrie (a -> b) | |
(HasTrie a, HasTrie b) => HasTrie (Either a b) | |
(HasTrie a, HasTrie b) => HasTrie (a, b) | |
HasTrie x => HasTrie (Const x a) | |
(HasTrie a, HasTrie b) => HasTrie (:+! a b) | |
(HasTrie a, HasTrie b) => HasTrie (:*! a b) | |
(HasTrie a, HasTrie b, HasTrie c) => HasTrie (a, b, c) | |
HasTrie (g (f a)) => HasTrie (:. g f a) | |
(HasTrie (f a), HasTrie (g a)) => HasTrie (:+:! f g a) | |
(HasTrie (f a), HasTrie (g a)) => HasTrie (:*:! f g a) | |
(HasTrie (f a), HasTrie (g a)) => HasTrie (:+: f g a) | |
(HasTrie (f a), HasTrie (g a)) => HasTrie (:*: f g a) | |
(HasTrie a, HasTrie b, HasTrie c, HasTrie d) => HasTrie (a, b, c, d) |