[GHC] #12385: Another case of type families not being reduced

GHC ghc-devs at haskell.org
Tue Jul 12 15:31:26 UTC 2016


#12385: Another case of type families not being reduced
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.0.2
          Component:  Compiler       |           Version:  8.0.1
  (Type checker)                     |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Similar to #12381 and #11348 but this one doesn't pass with GHC HEAD
 either,

 {{{#!hs
 {-# LANGUAGE TypeInType, TypeFamilies, FlexibleInstances #-}

 import GHC.Types

 type family F (a :: Type) :: Type

 class C a where
   type D (a :: Type) :: F a

 instance (F a ~ Bool) => C a where
   type D a = True
 }}}

 fails with,
 {{{
 Hi.hs:11:14: error:
     • Expected kind ‘F a’, but ‘'True’ has kind ‘Bool’
     • In the type ‘True’
       In the type instance declaration for ‘D’
       In the instance declaration for ‘C a’
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12385>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list