Reputation: 6793
I'm scratching my head with the following behaviour. Is there an obvious reason why this is the case?
Prelude> :set -XDataKinds
Prelude> :k 'True
'True :: Bool
Prelude> :k ['True, 'False]
['True, 'False] :: [Bool]
Prelude> :k ['True]
<interactive>:1:2: error:
• Expected a type, but ‘ 'True’ has kind ‘Bool’
• In the type ‘[ 'True]’
PS: I'm on GHC 8.4.3 if this is a GHC bug and was fixed later.
Upvotes: 2
Views: 50
Reputation: 30113
You have to disambiguate list types from type level list types by the backtick:
> :k '[ 'True]
Also note the space after [
, which is needed to disambiguate from type-level character literals.
Upvotes: 4