I have accomplished this in two ways. Either drop the reflexive rule
and introduce a void sentinel type or use TypeEq (... you said
everything was fair game!) to explicitly specify the preference for
the reflexive case over the inductive case. An advantage of TypeEq is
that you can avoid overlapping (and also incoherent) instances and so
play nice with functional dependencies. A disadvantage is its
hyper-instability in terms of regressions via compiler development
(none yet, though).

There are better participants in the cafe for explaining the details
if you choose this path.

HTH

On Mon, Jul 28, 2008 at 11:03 PM, Brandon S. Allbery KF8NH
<[EMAIL PROTECTED]> wrote:
>
> On 2008 Jul 28, at 23:23, Kenn Knowles wrote:
>
>> What confuses me is that IncoherentInstances is on, but it is still
>> rejected by GHC 6.8.3 seemingly for being incoherent.  I haven't tried
>> it with any other version.  Am I missing something?  Any suggestions
>> or pointers?
>
> Er?  Looks to me like it wants the OverlappingInstances language extension.
>
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
> system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
> electrical and computer engineering, carnegie mellon university    KF8NH
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to