[Haskell-cafe] Overloading in a sub-class

Albert Y. C. Lai trebla at vex.net
Wed Aug 17 20:39:51 CEST 2011


On 11-08-17 12:10 PM, Patrick Browne wrote:
> -- Are  + and negate part of the signature of Numb1?
> class Numb0 a  =>  Numb1 a where

No.

> -- Is it possible to override these operations in instances of Numb1?
> -- Something like:
> -- instance Numb1 Float where
> --    x + y = y
> --    negate x =  x

No.



More information about the Haskell-Cafe mailing list