[GHC] #1097: enumFrom on basic numeric types should be strict

GHC trac at galois.com
Sat Jan 13 00:16:30 EST 2007


#1097: enumFrom on basic numeric types should be strict
----------------------------------+-----------------------------------------
    Reporter:  bdonlan at gmail.com  |       Owner:                       
        Type:  bug                |      Status:  new                  
    Priority:  normal             |   Milestone:                       
   Component:  libraries/base     |     Version:  6.6                  
    Severity:  minor              |    Keywords:  enum strictness      
  Difficulty:  Easy (1 hr)        |    Testcase:  lib/should_run/enum04
Architecture:  Unknown            |          Os:  Unknown              
----------------------------------+-----------------------------------------
The haskell report in section 6.3.4 states that "For all four of these
 Prelude numeric types, all of the enumFrom family of functions are strict
 in all their arguments.", however, with Integer, Float, and Double, this
 is not the case. As tests/ghc-regress/KNOWN_FAILURES notes, this may be a
 bug in the prelude, as the reference implementation is not strict on its
 arguments, however I believe the text in 6.3.4 should be accepted as
 normative, as this behavior has confused users in the past (
 http://www.haskell.org/pipermail/haskell-cafe/2007-January/021133.html ),
 and there is little legitimate usage for a list of [undefined..]::Integer.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1097>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list