[GHC] #1040: read::Float does not handle string that are all digits, but end in "."

GHC trac at galois.com
Wed Dec 6 10:31:07 EST 2006


#1040: read::Float does not handle string that are all digits, but end in "."
-------------------------+--------------------------------------------------
    Reporter:  guest     |       Owner:         
        Type:  bug       |      Status:  new    
    Priority:  low       |   Milestone:         
   Component:  Compiler  |     Version:  6.6    
    Severity:  normal    |    Keywords:         
  Difficulty:  Unknown   |    Testcase:         
Architecture:  Unknown   |          Os:  Unknown
-------------------------+--------------------------------------------------
(read a)::Float fails if a is a string that is all digits but ends int "."

  (read "20.")::Float fails

  but

  (read "20.3"):: Float succeeds


   compare to the c atof function which succeeds in producing a correct
 value
   in both cases

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


More information about the Glasgow-haskell-bugs mailing list