Re: [Haskell] Context of a pattern variable

2005-01-12 Thread kahl
Tomasz Zielonka <[EMAIL PROTECTED]> continues the thread on his second-order extension of as-patterns: > > > Malcolm Wallace <[EMAIL PROTECTED]> writes: > > > > > Marcus Mohnen, "Context Patterns", Proceedings of IFL'96 (LNCS 1268) > > > Marcus Mohnen, "Context Patterns II", Proceedi

Re: [Haskell] Context of a pattern variable

2005-01-12 Thread Tomasz Zielonka
On Wed, Jan 12, 2005 at 11:47:51AM +, Malcolm Wallace wrote: > Malcolm Wallace <[EMAIL PROTECTED]> writes: > > > Marcus Mohnen, "Context Patterns", Proceedings of IFL'96 (LNCS 1268) > > Marcus Mohnen, "Context Patterns II", Proceedings of IFL'97 (LNCS 1467) > > There is a web page too

Re: [Haskell] Context of a pattern variable

2005-01-12 Thread Malcolm Wallace
Malcolm Wallace <[EMAIL PROTECTED]> writes: > Marcus Mohnen, "Context Patterns", Proceedings of IFL'96 (LNCS 1268) > Marcus Mohnen, "Context Patterns II", Proceedings of IFL'97 (LNCS 1467) There is a web page too, with an implementation of context patterns for an old (2.01) version of ghc

Re: [Haskell] Context of a pattern variable

2005-01-12 Thread Malcolm Wallace
Tomasz Zielonka <[EMAIL PROTECTED]> writes: > I have an idea for a funny extension to pattern matching in Haskell. I > wonder if it was proposed before, and most importantly, if it would be seen > as useful. Yes, it has been proposed before. See Marcus Mohnen, "Context Patterns", Proceeding

Re: [Haskell] Context of a pattern variable

2005-01-11 Thread Tomasz Zielonka
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 > > (_

Re: [Haskell] Context of a pattern variable

2005-01-11 Thread Stefan Holdermans
Tomasz, I have an idea for a funny extension to pattern matching in Haskell. I wonder if it was proposed before, and most importantly, if it would be seen as useful. I haven't seen anything like this before, which if of course not to say that there has never been made a similar proposal before.

[Haskell] Context of a pattern variable

2005-01-11 Thread Tomasz Zielonka
Hello! I have an idea for a funny extension to pattern matching in Haskell. I wonder if it was proposed before, and most importantly, if it would be seen as useful. Currently, pattern variables get only the values of the corresponding subterms of a matched term. What if we could mark a pattern va