Changelog for semialign-1.1.0.1
1.1.0.1
- Drop
base-compat
dependency
1.1
- Split
Semialign
intoSemialign
andZip
. - Rename old
Zip
intoRepeat
- i.e. current main hierarchy is
- Remove
malign
, usesalign
oralignWith mappend
whereMonoid
is necessary. - Add
Option
instances
instance Functor f => Semialign f where
alignWith :: (These a b -> c) -> f a -> f b -> f c
instance Semialign f => Align f where
nil :: f a
instance Semialign f => Zip f where
zipWith :: (a -> b -> c) -> f a -> f b -> f c
instance Zip f => Repeat f where
repeat :: a -> f a
This biased choice, that Semialign
is a super-class of Zip
is motivated by the fact that
- There's no
Semialign
-like class anywhere else, yet Zip
andRepeat
areApply
(fromsemigroupoids
) andApplicative
with slightly more laws. I If you need onlyRepeat
class, and your type isn'tAling
able, maybe usingApplicative
is enough?
1
Split out of these
package.