Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
invmap :: Invariant f => (a -> a') -> (a' -> a) -> f a -> f a'monoidal-functors Data.Functor.Invariant Given two isomorphic functions f and g, map over the invariant parameter a.
Examples
>>> :t invmap @Identity (read @Bool) show invmap @Identity (read @Bool) show :: Identity String -> Identity Bool
>>> invmap @Identity (read @Bool) show (Identity "True") Identity True
-
JSON support for monoidmap. JSON support for the monoidmap package, compatible with aeson.
-
Examples for monoidmap. Examples for the monoidmap package.
module Data.MonoidMap.Examples.
MultiMap Provides the MultiMap class, which models a total relation from unique keys to sets of values.
Implementations
The following example implementations are provided: TODO: tableclass (Eq m k v, Ord k, Ord v) =>
MultiMap (m :: Type -> Type -> Type) k vmonoidmap-examples Data.MonoidMap.Examples.MultiMap Models a total relation from unique keys to sets of values.
isSubmapOf :: MultiMap m k v => m k v -> m k v -> Boolmonoidmap-examples Data.MonoidMap.Examples.MultiMap Indicates whether or not the first map is a sub-map of the second.
m1 `isSubmapOf` m2 ≡ ∀ k. (lookup k m1 `Set.isSubsetOf` lookup k m2)
class (Eq m k v, Ord k, Ord v) =>
MultiMap (m :: Type -> Type -> Type) k vmonoidmap-examples Data.MonoidMap.Examples.MultiMap.Class Models a total relation from unique keys to sets of values.
isSubmapOf :: MultiMap m k v => m k v -> m k v -> Boolmonoidmap-examples Data.MonoidMap.Examples.MultiMap.Class Indicates whether or not the first map is a sub-map of the second.
m1 `isSubmapOf` m2 ≡ ∀ k. (lookup k m1 `Set.isSubsetOf` lookup k m2)
module Data.MonoidMap.Examples.MultiMap.Instances.
MultiMap1 An unlawful implementation of MultiMap, implemented in terms of Map and Set. This implementation has several subtle bugs. 💥
MultiMap :: Map k (Set v) -> MultiMap1 k vmonoidmap-examples Data.MonoidMap.Examples.MultiMap.Instances.MultiMap1 No documentation available.