
8 Jun
2001
8 Jun
'01
7:46 a.m.
| 1- When I load the following module: | | module Foo() where | default (Float) | | into ghci. 2+3 gives (5::Integer). Should it not give | (5.0::Float). Hugs does. Good point: it should. This is really a bug. | 2. class Op a where | (%+) :: a -> a -> a | | instance Op Integer where | (%+) = (+) | | with the above code: (2 %+ 3) should be resolved to | Integer type. Could anybody explain why it should not. Defaulting only appplies for standard classes (check out the Report). Simon
8748
Age (days ago)
8748
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Peyton-Jones