[GHC] #10815: Need more kind inference in associated type instances
GHC
ghc-devs at haskell.org
Mon Aug 31 06:25:59 UTC 2015
#10815: Need more kind inference in associated type instances
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
When I say
{{{
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies #-}
module Bug where
import Data.Proxy
class kproxy ~ 'KProxy => C (kproxy :: KProxy k) where
type F (a :: k)
instance C ('KProxy :: KProxy Bool) where
type F a = Int
}}}
I get
{{{
Type indexes must match class instance head
Found ‘k’ but expected ‘Bool’
In the type instance declaration for ‘F’
In the instance declaration for ‘C (KProxy :: KProxy Bool)’
}}}
But the kind of `a` should really be known to be `Bool`.
This ticket is broken out from comment:3:ticket:9063, which was evidently
not addressed when fixing that ticket.
Patch coming soon.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10815>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list