[GHC] #13643: Core lint error with TypeInType and TypeFamilyDependencies

GHC ghc-devs at haskell.org
Fri May 5 14:06:29 UTC 2017


#13643: Core lint error with TypeInType and TypeFamilyDependencies
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  InjectiveFamilies, TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12102            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 With HEAD I get
 {{{
 <no location info>: warning:
     In the expression: $fShowT @ 'I @ 'False
     Kinds don't match in type application:
     Type variable: a2_a18K :: Interp 'I
     Arg type: 'False :: Bool
     Linted Arg kind: Bool
 <no location info>: warning:
     In the type ‘Show (T 'I 'False)’
     Kind application error in type ‘T 'I 'False’
       Function kind = forall (a :: Code). Interp a -> *
       Arg kinds = [('I, Code), ('False, Bool)]
 <no location info>: warning:
     [RHS of $dShow_a18r :: Show (T 'I ('False |> Sym (D:R:Interp[0])))]
     Kind application error in
       coercion ‘(T <'I>_N
                    (Sym (Coh (Sym (Coh <'False>_N
                                        (Trans (Sym (D:R:Interp[0]))
 (D:R:Interp[0]))))
                              (Sym (D:R:Interp[0])))))_N’
       Function kind = forall (a :: Code). Interp a -> *
       Arg kinds = [('I, Code), ('False, Bool)]
 }}}
 Look at at the type in the second error:
 {{{
     In the type ‘Show (T 'I 'False)’
 }}}
 It's ill-kinded!  I discussed with Richard and this is just another
 example of #12919.  Consider what happens if we flatten
 {{{
   T 'I ('False |> g)
 }}}
 we'll get the flattened type
 {{{
   T 'I 'False
 }}}
 (plus a coercion), which is ill-kinded.

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


More information about the ghc-tickets mailing list