Dear GHC Bug Hunters,

I found a bug in derived instances for Show that contain
`Float' numbers.  Running

  data MassPnt  = MassPnt Float (Float, Float)
                  deriving (Show)

  main = do
           print 1.18088e+11
           let p = MassPnt 1.18088e+11 (-0.768153, -0.742202)
           print p

the first `print' is successfully executed, but the attempt
to output `1.18088e+11' below the constructor `MassPnt'
fails with

  Fail: Char.intToDigit: not a digit

The program doesn't fail for all floating point numbers,
e.g., `0.0' is output without any problems.  I used

  ghc 2.05 on Linux 2.0.30

Actually, I am pretty sure that this is not the whole story,
because I also had problems applying `show' directly to some
floating point numbers.  But, I couldn't reproduce this in a
small example yet.

Manuel

Reply via email to