Functor => Pointed => Applicative => Monad
Maciej Piechotka
uzytkownik2 at gmail.com
Mon Nov 29 17:16:53 CET 2010
On Mon, 2010-11-29 at 11:00 -0500, Tyson Whitehead wrote:
> On November 29, 2010 08:58:41 Maciej Piechotka wrote:
> > Probably it is because that the Monad is in core of many Haskell
> > libraries from which some do not define Applicative. Possibly it could
> > be tested on Hackage how big impact would be to current packages.
>
> This shouldn't really be a show stopper though. If you have the code to
> generate the Monad instance, you already have your Applicative instance
>
> f <*> x = do { f' <- f; x' <- x; return $ f x }
>
> Presumably, if you wanted to make this change (which I also think is a good
> idea), you would go through and patch the packages missing this instance first.
>
> Cheers! -Tyson
I guess the problem is not that it is not possible - the point of this
change is that every monad is applicative functor which is pointed
functor which is functor.
The problem is that it breaks code i.e. code that did compile does not
compile any more.
While it is possible to automatically 'fix' code on hackage it may not
be so easy if the code:
- is not distributed via Hackage
- license disallows to perform such change except copyright holder
I think that the change is good idea but it may cause problems.
Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/libraries/attachments/20101129/c6c635df/attachment.bin
More information about the Libraries
mailing list