On Fri, Jan 25, 2013 at 3:18 PM, <s9gf4...@gmail.com> wrote:

> 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
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to