multiinstance alternatives and similar packages
Based on the "Algebra" category.
Alternatively, view multiinstance alternatives based on common mentions on social networks and blogs.

cl3
Haskell Library implementing standard functions for the Algebra of Physical Space Cl(3,0) 
semilattices
join and meet semilattices, lower and upper bounds. 
partialsemigroup
A partial binary associative operator (appendMaybe :: a → a → Maybe a) 
sparsetensor
typesafe implementation of tensor algebra in Haskell 
intervalalgebra
A Haskell implementation of Allen's interval algebra 
lineartests
tests for Matrix.Linear Haskell library. Includes Arbitrary instances and property tests 
groupsgeneric
Derive Group instances using generics (Haskell library) 
cl3linearinterface
An interface to/from the Cl3 and Linear libraries 
cl3hmatrixinterface
An interface to/from the Cl3 and HMatrix libraries
Scout APM: A developer's best friend. Try free for 14days
Do you think we are missing an alternative of multiinstance or a related project?
README
multiinstance
Alternative versions of common typeclasses, augmented with a phantom type
parameter x
. The purpose of this is to deal with the case where a type has
more than one candidate instance for the original, unaugmented class.
Example: Integer sum and product
The canonical example of this predicament is selecting the monoid instance for a
type which forms a ring (and thus has at least two strong candidates for
selection as the monoid), such as Integer
. This therefore gives rise to the
Sum
and Product
newtype wrappers, corresponding to the additive and
multiplicative monoids respectively.
The traditional fold
based summation of a list of integers looks like this:
>>> import Data.Foldable (fold)
>>> import Data.Monoid (Sum (..))
>>> getSum (fold [Sum 2, Sum 3, Sum 5]) :: Integer
10
By replacing fold
with multi'fold
, whose constraint is MultiMonoid
rather
than Data.Monoid.Monoid
, we can write the same thing without the newtype
wrapper:
>>> :set XFlexibleContexts XTypeApplications
>>> multi'fold @Addition [2, 3, 5] :: Integer
10