2014 Applicative => Monad proposal

Edward Kmett ekmett at gmail.com
Thu May 23 23:53:39 CEST 2013


Yeah, if you wanted to write code to be compatible with non-GHC compilers,
yes, you'd have to supply the methods anyways.

This is pretty much what I do with anything remotely portable that I write.
I put in default signatures so folks who aren't concerned with portability
can get ease of use and then i bother to put the default definitions for my
own methods unless i'm writing something highly GHC-specific that can't
work with another compiler anyways.

I'd be perfectly okay with just saying +1 to the proposal as it stands.
DefaultSignatures have somewhat annoying nuances. e.g. you have to have the
subclass present where you define the superclass, which means internally
Functor, Applicative and Monad would need to live in the same module
somewhere, before being re-exported from their current homes, and then
missing definitions upgrade from a simple warning to a full error about not
being able to find the instances required for the default signature.

I mentioned it mostly to remind folks that it does provide an alternative
to some of the plumbing used in this proposal -- not intending to gum up
the works!


On Thu, May 23, 2013 at 5:46 PM, Ben Millwood <haskell at benmachine.co.uk>wrote:

> On Thu, May 23, 2013 at 03:50:40PM -0500, Jeremy Shaw wrote:
>> Great! I'd loved to see Pointed in there too -- but I have no dreams
>> of winning that one. :p
> I'm of the opinion that Pointed is excessive granularity. See also:
> http://www.haskell.org/**haskellwiki/Why_not_Pointed<http://www.haskell.org/haskellwiki/Why_not_Pointed>
> ?
> In general, with regards to the difficulty keeping track of facts and
> discussions, I think it could be a good idea to use the wiki more. I mean,
> discussion is best on the mailing list, but I feel like the original
> proposals and facts of the matter could stand to go there, so that they're
> easily-retrieved later on.
> Anyway. +1 AMP from me.
> I'm a little uneasy about default signatures. In particular, if I write
> code assuming that they exist, can it be compiled by compilers which don't
> support it, and just result in a missing method?
> ______________________________**_________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/**mailman/listinfo/libraries<http://www.haskell.org/mailman/listinfo/libraries>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130523/4866abb6/attachment.htm>

More information about the Libraries mailing list