#1997: Stricter enumFrom instance for Integer, to match Int
-----------------------------------+----------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: libraries/base | Version: 6.8.2
Severity: major | Resolution:
Keywords: | Difficulty: Easy (1 hr)
Testcase: lib/should_run/enum04 | Architecture: Multiple
Os: Multiple |
-----------------------------------+----------------------------------------
Changes (by Bart Massey):
* severity: normal => major
Comment:
The current Report only requires that enumFrom* on Int, Integer, Float and
Double instances be strict in all their arguments, but arguably all
instances should be strict in this way. Otherwise, the behavior gets
pretty mystifying---in particular, the referenced stack overflows and out-
of-memory errors.
The patch from dons for enumDeltaInteger needs to be accepted. In
addition, similar patches should be constructed for Float and Double.
(Before 6.10 would be even better; this is a non-trivial deviation from
the Report...) For 6.10, someone should probably also go through the
remaining Enum types and make sure that their enumFrom is strict in its
arguments as well.
(Several of us just spent a half-day on #haskell tracking this down and
verifying it. Then dons pointed us at this bug report. :-)
Thanks much to rwbarton, dolio, dons, and others on #haskell for helping
me understand this.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1997#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs