[Haskell-cafe] Strange error message with PolyKinds

Nikolay Amiantov ab at fmap.me
Fri Jul 17 18:37:04 UTC 2015


Hi Cafe,

I've bumped into a strange error message -- it looks like an obvious
bug, but maybe there's something that I'm just not aware of:

GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help
ghci> type Test a = a
ghci> type Huh = Test

<interactive>:3:1:
    Type synonym ‘Test’ should have 1 argument, but has been given none
    In the type declaration for ‘Huh’

So far, so good:

ghci> :set -XPolyKinds
ghci> type Test a = a
ghci> type Huh = Test

<interactive>:6:1:
    Type synonym ‘Test’ should have 2 arguments, but has been given 1
    In the type declaration for ‘Huh’

(Notice the number of arguments reported in the second case)

-- 
Nikolay.


More information about the Haskell-Cafe mailing list