[GHC] #15081: Finite list becomes infinite after maping fractional function for high numbers

GHC ghc-devs at haskell.org
Wed Apr 25 07:12:02 UTC 2018


#15081: Finite list becomes infinite after maping fractional function for high
numbers
-------------------------------------+-------------------------------------
        Reporter:  Onsed             |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 Great analysis @sighingnow.

 You don't actually need the map, here's a simpler reproducerL

 {{{
 $ ghci
 GHCi, version 8.4.2: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/omer/rcbackup/.ghci
 λ:1> [9007199254740990..9007199254740991] :: [Double]
 }}}

 This prints an infinite list.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15081#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list