
13 Nov
2002
13 Nov
'02
9:41 a.m.
But this brings up a strange thing in GHCi. Suppose I load the following module into GHCi:
\begin{code} module Foo where
kalle = (fromRational ((toRational 4) - ( toRational 5.2 )))
default (Rational) \end{code}
What happens is the following:
Prelude> :l Foo.hs Compiling Foo ( Foo.hs, interpreted ) Ok, modules loaded: Foo. *Foo> kalle (-6) % 5 *Foo> (fromRational ((toRational 4) - ( toRational 5.2 ))) -1.2000000000000002
It seems like GHCi doesn't care about the default directive on the promt.
This is a known bug: http://sourceforge.net/tracker/index.php?func=detail&aid=431362&group_id =8032&atid=108032 Cheers, Simon
8225
Age (days ago)
8225
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow