Hoogle Search
Within LTS Haskell 24.36 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
monoidal-containers Data.IntMap.Monoidal.Strict An IntMap with monoidal accumulation
MonoidalIntMap :: IntMap a -> MonoidalIntMap amonoidal-containers Data.IntMap.Monoidal.Strict No documentation available.
-
This module provides a Map variant which uses the value's Monoid instance to accumulate conflicting entries when merging Maps. While some functions mirroring those of Map are provided here for convenience, more specialized needs will likely want to use either the Newtype or Wrapped instances to manipulate the underlying Map.
-
monoidal-containers Data.Map.Monoidal A Map with monoidal accumulation
MonoidalMap :: Map k a -> MonoidalMap k amonoidal-containers Data.Map.Monoidal No documentation available.
-
monoidal-containers Data.Map.Monoidal.Strict A Map with monoidal accumulation
MonoidalMap :: Map k a -> MonoidalMap k amonoidal-containers Data.Map.Monoidal.Strict No documentation available.
-
No documentation available.
-
monoidmap Data.MonoidMap No documentation available.
-
functor-combinators Data.Functor.Combinator This class effectively gives us a way to generate a value of f a based on an i a, for Tensor t i. Having this ability makes a lot of interesting functions possible when used with biretract from SemigroupIn that weren't possible without it: it gives us a "base case" for recursion in a lot of cases. Essentially, we get an i ~> f, pureT, where we can introduce an f a as long as we have an i a. Formally, if we have Tensor t i, we are enriching the category of endofunctors with monoid structure, turning it into a monoidal category. Different choices of t give different monoidal categories. A functor f is known as a "monoid in the (monoidal) category of endofunctors on t" if we can biretract:
t f f ~> f
and also pureT:i ~> f
This gives us a few interesting results in category theory, which you can stil reading about if you don't care:- All functors are monoids in the monoidal category on :+:
- The class of functors that are monoids in the monoidal category on :*: is exactly the functors that are instances of Plus.
- The class of functors that are monoids in the monoidal category on Day is exactly the functors that are instances of Applicative.
- The class of functors that are monoids in the monoidal category on Comp is exactly the functors that are instances of Monad.
instance Monad f => MonoidIn Comp Identity f
Any other sort of instance and it's easy to run into problems with type inference. If you want to write an instance that's "polymorphic" on tensor choice, use the WrapHBF and WrapF newtype wrappers over type variables, where the third argument also uses a type constructor:instance MonoidIn (WrapHBF t) (WrapF i) (MyFunctor t i)
This will prevent problems with overloaded instances.