[GHC] #12381: Type family not reduced

GHC ghc-devs at haskell.org
Mon Jul 11 16:52:14 UTC 2016


#12381: Type family not 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:
-------------------------------------+-------------------------------------
 Andres pointed out that the following fails to compile with GHC 8.0.1 but
 succeeds with `master` (f53d761df9762232b54ec57a950d301011cd21f8),

 {{{#!hs
 {-# LANGUAGE TypeInType, TypeFamilies #-}
 module Kinds where

 import GHC.Types

 type family G (a :: Type) :: Type
 type instance G Int = Bool

 type family F (a :: Type) :: G a
 type instance F Int = True
 }}}

 Error:
 {{{
 Hi.hs:10:23: error:
     • Expected kind ‘G Int’, but ‘'True’ has kind ‘Bool’
     • In the type ‘True’
       In the type instance declaration for ‘F’
 }}}

 We should figure out what fixed this so it can hopefully be merged for
 8.0.2. I initially suspected the patch cited in #12175 but sadly this
 doesn't seem to be the case.

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


More information about the ghc-tickets mailing list