LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
I recently upgraded to ghc 8 and started using stacks via ImplicitParams. For that I wind up using 'type Stack = (?stack :: CallStack)' and so ContraintKinds (I see that in the future GHC will do this by default). So now I can have a file like: module T where import qualified Log as Log f :: Lo

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Eric Seidel
IIRC ConstraintKinds is only required in the module that defines the type synonym, so your module T does not need it. My guess is that haskell-src-exts sees 'Log.Stack =>', in which we have nullary constraint instead of a unary constraint, and assumes that's bogus without MultiParamTypeClasses. But

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
Right, that sounds like a good idea to me, it's the same reason I added the synonym myself. WRT not needing an extension I guess this is part of a general pattern where you don't need extensions to use code that uses extensions. In this case though it seems a bit odd in that using the code that u

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Eric Seidel
On Sun, Feb 14, 2016, at 18:15, Evan Laforge wrote: > Right, that sounds like a good idea to me, it's the same reason I > added the synonym myself. > > WRT not needing an extension I guess this is part of a general pattern > where you don't need extensions to use code that uses extensions. In > t

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
On Mon, Feb 15, 2016 at 12:57 PM, Eric Seidel wrote: > It looks like it is. According to [1], the context must have the form `C > a` unless FlexibleContexts is enabled. Works for me, thanks! ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@h