[Haskell] Context of a pattern variable

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Jan 12 02:04:20 EST 2005


On Wed, Jan 12, 2005 at 01:02:43AM +0100, Stefan Holdermans wrote:
> Furthermore, I think with this syntax,  it is just too easy to get 
> wrong. Maybe I'm mistaken, but, to illustrate, I believe there's even 
> an error in the very examples given by you:
> 
> >after:
> >
> >  case t of
> >      (_, _, ctx @> z) -> ctx z
> 
> Shouldn't that be  <code>case t of (_, _, ctx @> z) -> ctx (z + 1)</code>?

Yes, it should.

I didn't have much time to think about this idea, so I thought I will pass it
on to other people with more time and/or brains before I completely forget it.

As for the bug, let me give you more data points to consider. At the time I
was writing the examples I was simultaneously distracted by my wife (accusing
me of being a computer-o-holic ;) and my cat (wanting me to play with her).
I think it was a bigger "contribution" to this bug :)

Best regards,
Tomasz


More information about the Haskell mailing list