Open treeowl opened 3 years ago
They're data monads. (that's return :: a %1 -> M a; (>>=) :: M a %1 -> (a %-> M b) -> M b
(note the one unrestricted arrow in (>>=)
).
I don't think that the unrestricted liftA2
can be deduced from the data monad structure. But many data monads are also monads in Hask, therefore have this unrestricted liftA2
.
The problem with seeing them as applicatives as you suggest is that I can't really see a way to relate pure
and liftA2
that I can see.
[]
andData.Sequence
seem almost the opposite of dataApplicative
:pure
is linear, butliftA2
is not. Are there other types like this?