[GHC] #8966: Pattern synonyms and kind-polymorphism

#8966: Pattern synonyms and kind-polymorphism -------------------------------------+------------------------------------- Reporter: kosmikus | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.8.1-rc2 checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects Architecture: Unknown/Multiple | valid program Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- There's a strange interaction between pattern synonyms, GADTs, kind polymorphism and data kinds. The following module fails to compile with ghc-7.8.1-rc2, but I think it should: {{{ {-# LANGUAGE PolyKinds, KindSignatures, PatternSynonyms, DataKinds, GADTs #-} data NQ :: [k] -> * where D :: NQ '[a] pattern Q = D }}} I get the following error: {{{ KindPat.hs:6:13: Could not deduce (a ~ a0) from the context (t ~ '[a]) bound by the type signature for (Main.$WQ) :: t ~ '[a] => NQ t at KindPat.hs:6:9 ‘a’ is a rigid type variable bound by the type signature for (Main.$WQ) :: t ~ '[a] => NQ t at KindPat.hs:6:13 Expected type: NQ t Actual type: NQ '[a0] In the expression: D In an equation for ‘$WQ’: ($WQ) = D }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8966 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8966: Pattern synonyms and kind-polymorphism ----------------------------------------------+---------------------------- Reporter: kosmikus | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: GHC rejects valid program | Architecture: Test Case: | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by simonpj): * owner: => simonpj Comment: Thanks. A zonking step is missing. Patch coming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8966#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8966: Pattern synonyms and kind-polymorphism
----------------------------------------------+----------------------------
Reporter: kosmikus | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version:
Resolution: | 7.8.1-rc2
Operating System: Unknown/Multiple | Keywords:
Type of failure: GHC rejects valid program | Architecture:
Test Case: | Unknown/Multiple
Blocking: | Difficulty: Unknown
| Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by Simon Peyton Jones

#8966: Pattern synonyms and kind-polymorphism ----------------------------------------------+---------------------------- Reporter: kosmikus | Owner: simonpj Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler (Type checker) | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: GHC rejects valid program | Architecture: Test Case: patsyn/T8966 | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by simonpj): * status: new => merge * testcase: => patsyn/T8966 Comment: Good catch, thank you. Please merge to 7.8 branch in due course. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8966#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8966: Pattern synonyms and kind-polymorphism ----------------------------------------------+---------------------------- Reporter: kosmikus | Owner: simonpj Type: bug | Status: merge Priority: normal | Milestone: 7.8.3 Component: Compiler (Type checker) | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: GHC rejects valid program | Architecture: Test Case: patsyn/T8966 | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by thoughtpolice): * milestone: => 7.8.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8966#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8966: Pattern synonyms and kind-polymorphism ----------------------------------------------+---------------------------- Reporter: kosmikus | Owner: simonpj Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Compiler (Type checker) | Version: Resolution: fixed | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: GHC rejects valid program | Architecture: Test Case: patsyn/T8966 | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to 7.8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8966#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC