Proposal: add liftA4 and liftA5 to match liftM4 and liftM5

Andreas Abel abela at chalmers.se
Sat Nov 8 13:11:48 UTC 2014


On 08.11.2014 13:52, Aleksey Khudyakov wrote:
>  In particular liftM and ap
> shoudl stay as they are. Those are implementations of fmap and <*> using
> monadic bind and thus useful for writing instances like:
>
>> instance Functor T where
>>    fmap = liftM
>> instance Applicative T where
>>    pure = return; (<*>) = ap
>> instance Monad T where ...
>
> Changing ap will break a lot of code.

Fair enough.  The functions for "default implementations" of Functor and 
Applicative from Monad and the like should of course stay.

I forgot that AMP does not / cannot give you these default 
implementations for free.


-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Libraries mailing list