Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread kh
> And now for a little quiz. What's the value of the following (legal) > Haskell expression? (Don't try it with hbc, it fails.) > > let (+) + 1 + 1 = (+) > in 1 + 1 > > This is illegal syntax!! (+) and (the second) + are the same > variable, thus violating the linearity

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread smk
> | Another strange thing about n+k patterns. > | > | Its definition uses >= , but >= is not part of the class Num. > | Does that mean that n+k patterns have to be instances of class Real? > > Certainly. In fact, they're really meant to apply only to class > Integral (and it would be

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread smk
Another strange thing about n+k patterns. Its definition uses >= , but >= is not part of the class Num. Does that mean that n+k patterns have to be instances of class Real? One could leave it class Num, if the translation were expressed in terms of "signum" rather than ">=". Question: Can one

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread kh
> And now for a little quiz. What's the value of the following (legal) > Haskell expression? (Don't try it with hbc, it fails.) > > let (+) + 1 + 1 = (+) > in 1 + 1 Given infixl 6 + (since you can't change this without renaming!): (+) + 1 + 1 ==> lpat6 + pat7

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread hudak-paul
And now for a little quiz. What's the value of the following (legal) Haskell expression? (Don't try it with hbc, it fails.) let (+) + 1 + 1 = (+) in 1 + 1 This is illegal syntax!! (+) and (the second) + are the same variable, thus violating the linearity constraint for l

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread Joe Fasel
| > | Another strange thing about n+k patterns. | > | | > | Its definition uses >= , but >= is not part of the class Num. | > | Does that mean that n+k patterns have to be instances of class Real? | > | > Certainly. In fact, they're really meant to apply only to class | > Integral (a

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread Bambang Nurcahyo Prastowo
>From: Lennart Augustsson <[EMAIL PROTECTED]> >... >And now for a little quiz. What's the value of the following (legal) >Haskell expression? (Don't try it with hbc, it fails.) > >let (+) + 1 + 1 = (+) >in 1 + 1 > >-- Lennart > Gofer Version 2.28a Copyright (c) Mark P Jone

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread Simon L Peyton Jones
I agree with everything Paul says, about translations, and about Norman's point. I'll record them in my things-to-improve-in-the-next-iteration-of the-Report file... Incidentally, I also do not like n+k patterns, but they don't seem to be a big issue to me, either from a semantic or implementa

Re: Successor patterns in bindings and n+k patterns

1993-05-19 Thread Joe Fasel
| Another strange thing about n+k patterns. | | Its definition uses >= , but >= is not part of the class Num. | Does that mean that n+k patterns have to be instances of class Real? Certainly. In fact, they're really meant to apply only to class Integral (and it would be natural numbers, if we h

Re: Successor patterns in bindings

1993-05-18 Thread hudak-paul
Speaking of n+k patterns, did anyone ever answer this question? > Date: Wed, 14 Apr 1993 11:24:54 + > From: [EMAIL PROTECTED] > Subject: Successor patterns in bindings > To: Multiple recipients of list HASKLD-L <[EMAIL PROTECTED]> > > I'm puzzled by a bit of the Haskell 1.2 repo