[GHC] #12069: Possible type inference regression: "Expected a type, but 'a' has kind 'k0'"
GHC
ghc-devs at haskell.org
Mon May 16 08:30:42 UTC 2016
#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
More information about the ghc-tickets
mailing list