More at-use-site extension pragmas please

David Feuer david.feuer at
Mon Mar 16 01:47:02 UTC 2015

For people working on libraries intended to be portable but
using/offering GHC specials when compiled with GHC, it's nice to be
able to verify quickly that nothing relies on a GHC extension that
shouldn't. For example, I just submitted a pull request to add an
IsString instance to Data.Sequence:

instance IsString (Seq Char) where
  fromString = fromList

This instance requires FlexibleInstances to compile. Since that option
is global, GHC will no longer complain about non-standard instance
heads *anywhere* in the (large) module. The obvious long-term
solution, I believe, is to add {-# FlexibleInstance #-} (and {-#
FlexibleContext #-}) pragmas. Well, that or get some sort of
termination checker into Haskell 2015!


More information about the ghc-devs mailing list