### Re: n+k patterns

From my point of view (n+k)-patterns have a very special meaning. This natural numbers should be considered as a type like this: data Nat = Zero | Succ Nat Therefore a (n+k)-pattern is an abbreviation for Succ(Succ(...Zero...)). It's obvious that "+" in "(n+k)" doesn't mean a somewhere else

### Re: Successor patterns in bindings and n+k patterns

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

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 Jones 1991-1993

### Re: n+k patterns, etc.

Some more questions concerning some constructs in Haskell: What if (the appropriate parts of) the standard prelude is explicitly *not* imported: import Prelude () or import Prelude hiding(map) (see section 5.4.3). Are then the hidden parts of the standard prelude still

### Re: Successor patterns in bindings and n+k patterns

| 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

### Re: Successor patterns in bindings and n+k patterns

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

### Re: Successor patterns in bindings and n+k patterns

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

### Re: Successor patterns in bindings and n+k patterns

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

| 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