Merge FlexibleContexts with FlexibleInstances?

Herbert Valerio Riedel hvriedel at gmail.com
Fri Feb 6 07:48:58 UTC 2015


On 2015-02-06 at 07:05:35 +0100, David Feuer wrote:
> In my limited experience thus far, it seems to me that a substantial
> majority of modules that start out needing one of these end up needing the
> other one too. They appear to be two sides of the same coin, each allowing
> for (slightly) more powerful termination checking. Should the two just be
> made synonyms, to cut down a tiny bit on the boilerplate LANGUAGE pragmas?

Otoh, FlexibleInstances is only needed if you define instances, while
FlexibleContexts can also be required with code not defining any
instances (and GHC 7.10 requires FlexibleContexts more often now for
inferred type-signatures which couldn't be written w/o FlexibleContexts)

Cheers,
  hvr


More information about the ghc-devs mailing list