[Haskell-cafe] Strange error message with PolyKinds

Nikolay Amiantov ab at fmap.me
Fri Jul 17 20:13:33 UTC 2015


Thanks, it indeed looks so! I guess better error message would be
desirable; reported as #10654.

On 07/17/2015 10:53 PM, Jonas Scholl wrote:
> 
> I would guess the two arguments are a kind and a type of that kind. The
> kind is given implicitly, so this corresponds to your one given
> argument. If we specify a kind, we get the following:
> 
> Prelude> :set -XPolyKinds -XDataKinds -XKindSignatures
> Prelude> type Test a = a
> Prelude> type Huh a = Test (a :: Bool)
> Prelude> type Bar = Huh
> 
> <interactive>:5:1:
>     Type synonym ‘Huh’ should have 1 argument, but has been given none
>     In the type declaration for ‘Bar’
> 
> So it really takes two arguments and we can specify one, leaving one to
> be specified. Maybe a better error message would be useful, but I would
> not say this is a bug.

-- 
Nikolay.


More information about the Haskell-Cafe mailing list