On Fri, Oct 11, 2013 at 1:00 PM, Simon Peyton-Jones
wrote:
> First, in this case Set’s argument has nominal role, so the GND you give
> would be rejected anyway. So Set’s sanctity stays unscathed.
>
Fair enough. I'm very happy to hear that avenue of attack doesn't work. =)
> But beyond that, whe
Wait, that sounds like it induces bad semantics.
I’m not sure this is as bad as you say.
First, in this case Set’s argument has nominal role, so the GND you give would
be rejected anyway. So Set’s sanctity stays unscathed.
But beyond that, when you say
newtype Bar = Bar Int deriving (Eq,Foo)
t
On Thu, Oct 10, 2013 at 10:09 PM, Edward Kmett wrote:
> Wait, that sounds like it induces bad semantics.
>
> Can't we use that as yet another way to attack the sanctity of Set?
>
> class Ord a => Foo a where
> badInsert :: a -> Set a -> Set a
>
> instance Foo Int where
> badInsert = insert
>
Wonderful!
On Fri, Oct 11, 2013 at 11:57 AM, Simon Marlow wrote:
> On 02/10/13 17:01, Dag Odenhall wrote:
>
>> What about |MonadComprehensions|, by the way? The way I see it, it's an
>>
>> even better fit for |Applicative| because the |return| is implicit.
>>
>
> It would happen automatically,
On 02/10/13 17:01, Dag Odenhall wrote:
What about |MonadComprehensions|, by the way? The way I see it, it's an
even better fit for |Applicative| because the |return| is implicit.
It would happen automatically, because a Monad comprehension is
represented using the same abstract syntax as a do-
Thanks for all the comments. I've updated the wiki page, in particular
to make it clear that Applictive do-notation would be an opt-in extension.
Cheers,
Simon
On 02/10/13 16:09, Dan Doel wrote:
Unfortunately, in some cases, function application is just worse. For
instance, when the result is