[Haskell-cafe] Re: Is my code too complicated?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Jul 4 18:08:24 EDT 2010


Nils Schweinsberg <ml at n-sch.de> writes:

> On Sun, 4 Jul 2010 15:47:21 +0200, Ertugrul Soeylemez <es at ertes.de> wrote:
>> This requires a bunch of type system extensions, though, most notably
>> the UndecidableInstances extension.  But it's safe to use here.
>
> Probably a bit off topic, but whats wrong with UndecidableInstances? Where
> is it safe to use, when would you avoid it and what can go wrong here?

I've been told that it's safe to use; enabling it just tells GHC that
you're sure that the instance constraints are OK (as they might be too
complicated for GHC's type checker; e.g. I have to use it when doing a
whole bunch of associated type constraints as GHC doens't like having
such a large set of constraints on the instance definition).

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list