[GHC] #8856: ScopedTypeVariables & PolyKinds lead to weird error message
#8856: ScopedTypeVariables & PolyKinds lead to weird error message ------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- When I try to compile {{{ {-# LANGUAGE ScopedTypeVariables, RankNTypes, PolyKinds #-} module Bug where import Data.Proxy foo = (undefined :: Proxy a) :: forall a. Proxy a }}} I get {{{ Bug.hs:7:27: Kind variable ‘k’ used as a type In an expression type signature: Proxy a In the expression: (undefined :: Proxy a) :: forall a. Proxy a In an equation for ‘foo’: foo = (undefined :: Proxy a) :: forall a. Proxy a }}} This is all the more odd given that `k` does not appear in my code! This bug happens both in HEAD and in 7.8.1 RC 2. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8856> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8856: ScopedTypeVariables & PolyKinds lead to weird error message -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 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 Simon Peyton Jones <simonpj@…>): In [changeset:"cf1a0f971966af633fbd932ad012ce716680465b/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="cf1a0f971966af633fbd932ad012ce716680465b" Fix the treatment of lexically scoped kind variables (Trac #8856) The issue here is described in Note [Binding scoped type variables] in TcPat. When implementing this fix I was able to make things quite a bit simpler: * The type variables in a type signature now never unify with each other, and so can be straightfoward skolems. * We only need the SigTv stuff for signatures in patterns, and for kind variables. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8856#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8856: ScopedTypeVariables & PolyKinds lead to weird error message -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 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 Simon Peyton Jones <simonpj@…>): In [changeset:"062391be4f06aa408187582c4a40f1cea80429c3/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="062391be4f06aa408187582c4a40f1cea80429c3" Test Trac #8856 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8856#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8856: ScopedTypeVariables & PolyKinds lead to weird error message -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: | Unknown/Multiple typecheck/should_compile/T8856 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => merge * testcase: => typecheck/should_compile/T8856 Comment: Good point, thank you. This is a real bug and should probably be merged to 7.8 Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8856#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8856: ScopedTypeVariables & PolyKinds lead to weird error message -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: Operating System: Unknown/Multiple | 7.8.1-rc2 Type of failure: None/Unknown | Keywords: Test Case: | Architecture: typecheck/should_compile/T8856 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: => 7.8.1 Comment: Merged. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8856#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC