-- 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.1.3 -- | 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 :: v -> Map k v -> TMap k v -- | A total map only default empty :: v -> TMap k v -- | Insert a key/value pair insert :: Ord k => k -> v -> TMap k v -> TMap k v -- | Singleton plus default singleton :: Ord k => k -> v -> v -> TMap k v -- | Sample a total map. Semantic function. (!) :: Ord k => TMap k v -> k -> v infixl 9 ! -- | 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. -- | Deprecated: Non-denotative range :: Ord v => TMap k v -> Set v mapKeysWith :: (Semiring z, Ord b) => (z -> z -> z) -> (a -> b) -> TMap a z -> TMap b z instance (GHC.Show.Show v, GHC.Show.Show k) => GHC.Show.Show (Data.TotalMap.TMap k v) instance (GHC.Classes.Ord k, GHC.Base.Semigroup v) => GHC.Base.Semigroup (Data.TotalMap.TMap k 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) instance (GHC.Classes.Ord k, Data.Semiring.Semiring v) => Data.Semiring.Semiring (Data.TotalMap.TMap k v) instance (GHC.Classes.Ord k, Data.Semiring.StarSemiring v) => Data.Semiring.StarSemiring (Data.TotalMap.TMap k v) instance (GHC.Classes.Ord k, Data.Semiring.DetectableZero v) => Data.Semiring.DetectableZero (Data.TotalMap.TMap k v)