[GHC] #12742: Instantiation of invisible type family arguments is too eager
GHC
ghc-devs at haskell.org
Thu Oct 20 13:50:02 UTC 2016
#12742: Instantiation of invisible type family arguments is too eager
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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:
-------------------------------------+-------------------------------------
This module looks, to me, like it should be accepted:
{{{
{-# LANGUAGE TypeInType, RankNTypes, TypeFamilies #-}
module Bug where
import Data.Kind
type family F :: forall k2. (k1, k2)
data T :: (forall k2. (Bool, k2)) -> Type
type S = T F
}}}
But it's not. The problem is that `TcHsType.handle_tyfams` eagerly
instantiates ''all'' invisible arguments to a type family at every
occurrence. Instead, it should instantiate only those that are counted in
the TF's arity -- that is, those "before the colon".
Will fix.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12742>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list