n+k patterns

Simon Peyton-Jones simonpj@microsoft.com
Tue, 29 Jan 2002 07:36:56 -0800


Folks

The Haskell Report says of n+k patterns:

"A n+k pattern can only be matched against a value in=20
the class Integral."

This seems far too strong.   All that is needed are Ord (for the >=3D =
and
-)
and Num (for fromInteger), and indeed that's what GHC requires.=20
Do Hugs or nhc actually require Integral?

In any case,  I propose to change "Integral" to "Ord and Num".

Does anyone think this is the Wrong Thing?

How this bug has lasted so long I don't know.

Simon