Well, it was a deliberate decision to limit the n+k pattern to class Integral because people at that time felt that n+k was something that should only be used with integers. So it's not a fluke, it was quite deliberate. I kind of like Integral for this (as much as I can like anything about n+k :). Since this is not a typo, I don't see why it should be changed unless there is some really good reason.
-- Lennart Simon Peyton-Jones wrote: > Folks > > The Haskell Report says of n+k patterns: > > "A n+k pattern can only be matched against a value in > the class Integral." > > This seems far too strong. All that is needed are Ord (for the >= and > -) > and Num (for fromInteger), and indeed that's what GHC requires. > 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 > > _______________________________________________ > Haskell mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/haskell _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell