typeclass relations

Hal Daume III hdaume@ISI.EDU
Mon, 9 Sep 2002 09:42:39 -0700 (PDT)


Hi,

> thing.  However, the warnings (and the names of the flags - "undecidable
> instances" doesn't sound good) make me nervous, and confused.  Why is
> there a problem with saying "every instance of Foo is also an instance of
> Bar, and here's how"?

>From what I understand, this is basically only to prevent cyclic
instances, i.e.,

  instance Bar a => Foo a where ...
  instance Foo a => Bar a where ...

"undecidable" certainly does sound scary, but I asked Simon PJ about this
a few weeks ago and to the best of his recollection at the time, this was
the only case it made a difference and, so long as you program compiles
with undecidable instances, there should be no runtime errors.  That is,
undecidable is simply a compile-time property and as long as you don't
have any cyclic declarations like the above, you're fine.

 - Hal