[GHC] #11241: Kind-level PartialTypeSignatures causes internal error

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Consider the following module: {{{#!hs {-# LANGUAGE ExplicitForAll, KindSignatures, PartialTypeSignatures #-} foo :: forall (a :: _) . a -> a foo = id }}} In HEAD, this fails with an internal errror: {{{ • GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [] • In the kind ‘_’ In the type signature: foo :: forall (a :: _). a -> a }}} I would expect it to succeed and figure out that the wildcard is `*`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * owner: => goldfire Comment: I'm on it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): This might possibly be related: running the following command in GHCi yields an error: {{{ $ ghc/inplace/bin/ghc-stage2 --interactive GHCi, version 7.11.20151219: http://www.haskell.org/ghc/ :? for help λ> :set -XTypeInType -XRankNTypes λ> :kind! forall (a :: k). 'Just a <interactive>:1:14: error: • GHC internal error: ‘k’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [] • In the kind ‘k’ In the type ‘forall (a :: k). Just a’ }}} Yet putting it into a module makes it compile without issues: {{{ {-# LANGUAGE RankNTypes, TypeInType #-} module InternalError where type T = forall (a :: k). 'Just a }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => TypeInType -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11241: Kind-level PartialTypeSignatures causes internal error
-------------------------------------+-------------------------------------
Reporter: adamgundry | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.11
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | dependent/should_compile/T11241 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * testcase: => dependent/should_compile/T11241 * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11241: Kind-level PartialTypeSignatures causes internal error -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: fixed | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | dependent/should_compile/T11241 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: => 8.0.1 Comment: Merged to `ghc-8.0` as 314e1489022e3022b4b348c43a8fa6688807c0c7. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11241#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC