
On Fri, Jan 25, 2013 at 3:18 PM,
Duplicate instance declarations:
instance [incoherent] (Num a, Ord a, Rangable range a,
Packable range a) =>
SubtypeOf range a
-- Defined at ...:22:10
instance [incoherent] (Integral a, Packable range a,
MultipleTo range a) =>
SubtypeOf range a
-- Defined at ...:29:10
This would be correct. Constraints on an instance are applied *after* the instance is selected, so when Haskell is looking for an instance, these two are identical. This has the code smell of trying to use typeclasses for OOP. That won't work. (Yes, really.) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net