Overlapping instances
Sean Seefried
Sean Seefried" <seefried@itee.uq.edu.au
Wed, 16 Jan 2002 13:02:33 +1000
Why is it that this source file
-- begin code --
class Numeric a
where describe :: a -> String
instance Integral a => Numeric a
where describe n = "Integral"
instance Floating a => Numeric a
where describe n = "Floating"
-- end code --
produces the error message
-- begin code --
*** This instance : Numeric a
*** Overlaps with : Numeric a
*** Common instance : Numeric a
-- end code --
even though I have overlapping instances turned on. The "+o" option.
------------------------------------------------
Sean Seefried
School of ITEE
The University of Queensland
Ph: 3365 8301
Mob: 0416 338 636