[GHC] #8706: Kind operators not parsed

#8706: Kind operators not parsed -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Parser) | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Take the following module: {{{ {-# LANGUAGE DataKinds, TypeOperators, TypeFamilies #-} data a + b = Inl a | Inr b type family Foo :: Bool + Bool }}} HEAD produces {{{ /Users/rae/temp/Bug.hs:5:25: parse error on input ‛+’ }}} It seems that type operators promoted to kinds are not parsed correctly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by goldfire): * component: Compiler (Parser) => Documentation Comment: Argh. Of course there can't be kind operators, because it would be impossible to parse them. For example, what does `Foo * Bar` mean? Is it `Foo` applied to `*` and `Bar`? Or is it `*` applied to `Foo` and `Bar`? I will document this, but I don't like it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed
-------------------------------------+------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Documentation | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Richard Eisenberg

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Documentation | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by goldfire): * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Documentation | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by dreixel): Is `*` the only problem here? If so, can't we promote everything else, and just refuse to promote type constructor operators named `*`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Documentation | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by goldfire): I do think that would work, but it seems a little unprincipled. And, it was a design decision I wasn't prepared to make without discussion. My general thought is that we're (in my humble opinion) heading to a future where the kind parser and the type parser are no longer distinct, because types and kinds will no longer be distinct. What does parsing in that world look like? I don't know, but I think we should try to future- proof any decision made here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.1 Component: Documentation | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by goldfire): * version: 7.7 => 7.8.1-rc1 * milestone: => 7.8.1 Comment: Putting on Austin's radar for 7.8.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8706: Kind operators not parsed -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Documentation | Version: 7.8.1-rc1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8706#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC