[GHC] #12069: Possible type inference regression: "Expected a type, but 'a' has kind 'k0'"

#12069: Possible type inference regression: "Expected a type, but 'a' has kind 'k0'" -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (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: -------------------------------------+------------------------------------- The following program causes GHC HEAD to give an error: {{{#!hs {-# LANGUAGE ScopedTypeVariables #-} module Foo where foo (_ :: p a) = [] :: [a] }}} {{{ [1 of 1] Compiling Foo ( kind.hs, kind.o ) kind.hs:4:25: error: • Expected a type, but ‘a’ has kind ‘k0’ • In an expression type signature: [a] In the expression: [] :: [a] In an equation for ‘foo’: foo (_ :: p a) = [] :: [a] }}} GHC 7.10.1 compiles it fine, and infers the type `foo :: p a -> [a]`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12069 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12069: Possible type inference regression: "Expected a type, but 'a' has kind
'k0'"
-------------------------------------+-------------------------------------
Reporter: akio | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
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 Simon Peyton Jones

#12069: Possible type inference regression: "Expected a type, but 'a' has kind 'k0'" -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | typecheck/should_compile/T12069 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => typecheck/should_compile/T12069 * status: new => closed * resolution: => fixed Comment: Fixed! Regression test added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12069#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC