| 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

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to