Skip to content

Parser groups "::" and "*" together in kind signature (a::*)

Compare a session in 7.10

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
Prelude> data A (a :: *) = B

<interactive>:2:14:
    Illegal kind signature: ‘*’
      Perhaps you intended to use KindSignatures
    In the data type declaration for ‘A’
Prelude> data A (a::*) = B

<interactive>:3:13: parse error on input ‘)’

to a session in 8.1

GHCi, version 8.1.20160105: http://www.haskell.org/ghc/  :? for help
Prelude> data A (a :: *) = B

<interactive>:1:14: error:
    Illegal kind signature: ‘*’
      Perhaps you intended to use KindSignatures
    In the data type declaration for ‘A’
Prelude> data A (a::*) = B

<interactive>:2:9: error:
    Unexpected type ‘a ::*’
    In the data declaration for ‘A’
    A data declaration should have form
      data A a = ...

GHC seems to group "::" and "*" together. Same with (★) from Data.Kind with TypeInType enabled.

Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority lowest
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information