[GHC] #11363: Parser groups "::" and "*" together in kind signature (a::*)

#11363: Parser groups "::" and "*" together in kind signature (a::*) -----------------------------------------+--------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler (Parser) | Version: 8.1 Keywords: | Operating System: Linux Architecture: x86 | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -----------------------------------------+--------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11363 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11363: Parser groups "::" and "*" together in kind signature (a::*) --------------------------------------+--------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler (Parser) | Version: 8.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | --------------------------------------+--------------------------- Comment (by rwbarton): That seems sensible, since `::*` is a valid operator name. {{{ Prelude> :set -XTypeOperators Prelude> data a ::* b Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11363#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11363: Parser groups "::" and "*" together in kind signature (a::*) --------------------------------------+--------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler (Parser) | Version: 8.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | --------------------------------------+--------------------------- Comment (by Iceland_jack): Replying to [comment:1 rwbarton]:
That seems sensible, since `::*` is a valid operator name.
Would the operator ever appear in that position (as a type/kind signature)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11363#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11363: Parser groups "::" and "*" together in kind signature (a::*) --------------------------------------+--------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler (Parser) | Version: 8.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | --------------------------------------+--------------------------- Comment (by rwbarton): Why does it matter? If `+` is a type operator and `::*` is a type operator and `data A (a +)` is a parse error then `data A (a ::*)` should be a parse error. Anything else seems terribly confusing! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11363#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11363: Parser groups "::" and "*" together in kind signature (a::*) --------------------------------------+------------------------------ Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: lowest | Milestone: Component: Compiler (Parser) | Version: 8.1 Resolution: invalid | Keywords: Operating System: Linux | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | --------------------------------------+------------------------------ Changes (by goldfire): * status: new => closed * resolution: => invalid Comment: Closing in concurrence with rwbarton. Reopen if you disagree. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11363#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC