haskell extensions question
Ken Shan
ken at digitas.harvard.edu
Sun Nov 30 23:44:46 EST 2003
Diego Yanivello <diegoy at sol.info.unlp.edu.ar> wrote in article <5.1.0.14.2.20031201003813.0150dbf8 at pop.infovia.com.ar> in gmane.comp.lang.haskell.general:
> ERROR "Test.hs":12 - Overlapping instances for class "B"
> *** This instance : B ()
> *** Overlaps with : B a
> *** Common instance : B ()
>
> but I don't have an instance "A ()" from which haskell can infer an
> instance "B ()".
> can somebody explain me that it is happening here?
Unfortunately, contexts in instance definitions are not taken into
account when checking for overlapping instances. That is, two instances
are regarded as overlapping as long as their heads can be unified.
--
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
International Human Rights Day * 2003-12-10 * http://www.un.org/rights/
What if All Chemists Went on Strike? (science fiction)
http://www.iupac.org/publications/ci/2003/2506/iw3_letters.html
More information about the Haskell
mailing list