[Haskell-cafe] Data Types a la Carte - automatic injections (help!)

Nicolas Frisby nicolas.frisby at gmail.com
Tue Jul 29 02:12:38 EDT 2008

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.


On Mon, Jul 28, 2008 at 11:03 PM, Brandon S. Allbery KF8NH
<allbery at ece.cmu.edu> 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] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university    KF8NH
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list