-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Finitely represented /total/ maps -- -- Finitely represented total maps. Represented by as a partial -- map and a default value. Has Applicative and Monad instances (unlike -- Data.Map). @package total-map @version 0.0.6 -- | Finitely represented total maps. Represented by as a partial -- map and a default value. Has Applicative and Monad instances (unlike -- Data.Map). module Data.TotalMap -- | Total map data TMap k v -- | Create a total map from a default value and a partial map. fromPartial :: a -> Map k a -> TMap k a -- | Sample a total map. Semantic function. (!) :: Ord k => TMap k v -> k -> v -- | Construct a total map, given a default value, a set of keys, and a -- function to sample over that set. You might want to trim the -- result. tabulate :: Eq k => v -> Set k -> (k -> v) -> TMap k v -- | Optimize a TMap, weeding out any explicit default values. A -- semantic no-op, i.e., (!) . trim == (!). trim :: (Ord k, Eq v) => TMap k v -> TMap k v -- | Intersect a total map with a partial one using an element combinator. intersectionPartialWith :: (Ord k) => (a -> b -> c) -> TMap k a -> Map k b -> Map k c -- | Witness the finiteness of the support concretely by giving its image. codomain :: Ord v => TMap k v -> Set v instance (GHC.Classes.Ord k, GHC.Base.Monoid v) => GHC.Base.Monoid (Data.TotalMap.TMap k v) instance GHC.Base.Functor (Data.TotalMap.TMap k) instance GHC.Classes.Ord k => GHC.Base.Applicative (Data.TotalMap.TMap k) instance GHC.Classes.Ord k => GHC.Base.Monad (Data.TotalMap.TMap k)