Scary, but true...the floats in my version of ghc don't like
to be referenced. The program
data MassPnt = MassPnt Float (Float, Float)
deriving (Show)
main = do
print 1.18088e+11 -- (1)
let
x = 1.18088e+11
p = MassPnt x (-0.768153, -0.742202) -- (*)
print x -- (2)
prints `1.18088e+11' successfully at line (1), but fails in
line (2) with `Fail: Char.intToDigit: not a digit'.
But now the *interesting* part: When I remove the line (*),
everything works just fine! Floats just don't like to be
referenced...or is there not enough space allocated for them
in the heap and they tend to be overwritten?
Now, I don't have the lattest version of GHC, so maybe
someone else hit that problem earlier (I also did't follow
all discussions on this list). (As said earlier, I used ghc
2.05 on Linux 2.0.30.)
Manuel
P.S.: Of course, I think that the problem that I reported
earlier was actually caused by the above one.