Possible Duplicate:
Negative doubles or floats in Haskell (macports)
I am new to haskell, and when I try to enter negative floating point numbers (e.g. -1.0) into ghci or use them in modules, I keep getting segmentation faults.
How do I give negative floating point values to variables w/o causing seg faults?
My apologies ahead of time if this is a total noob question, but I am kind of shocked this is as hard as it is...
That's a broken MacPorts build of GHC. Please try the Haskell Platform instead.
It seems like that this is a bug in ghci. You may consider changing the version of ghci or use hugs instead till the problem is fixed. If you get a segfault, something is going terribly wrong, as the RTS will normally ensure that this won't happen.
精彩评论