[GHC] #12384: Type family not reduced, again

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


#12384: Type family not reduced, again
-------------------------------------+-------------------------------------
        Reporter:  kosmikus          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by kosmikus:

@@ -14,1 +14,1 @@
- type D a = True
+   type D a = True

New description:

 This one looks similar to #12381, but unfortunately, it does not seem to
 be fixed in HEAD:
 {{{#!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
 }}}

 This yields (in 8.0.1 and 8.1.20160709):
 {{{
 Constraint.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/12384#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list