[GHC] #15709: GHC panic using TypeInType with minimal source code

GHC ghc-devs at haskell.org
Fri Oct 5 15:16:24 UTC 2018


#15709: GHC panic using TypeInType with minimal source code
-------------------------------------+-------------------------------------
        Reporter:  jnape             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.4.3
      Resolution:  duplicate         |             Keywords:  TypeInType
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Happily, I think this is probably fixed.  (Search for the many tickets
 with `piResultTy` in them.

 GHC 8.6 fails with
 {{{

 T15709.hs:10:25: error:
     • Expecting one more argument to ‘(p :: * -> b -> p * b)’
       Expected kind ‘* -> *’,
         but ‘(p :: * -> b -> p * b)’ has kind ‘* -> b -> p * b’
     • In the first argument of ‘Contravariant’, namely
         ‘(p :: * -> b -> p * b)’
       In the type signature:
         dimap :: (Contravariant (p :: * -> b -> p * b), Functor (p a)) =>
                  (z -> a) -> (b -> c) -> p a b -> p z c
    |
 10 | dimap :: (Contravariant (p :: * -> b -> p * b), Functor (p a)) => (z
 -> a)  -> (b -> c) -> p a b -> p z c
    |                         ^^^^^^^^^^^^^^^^^^^^^^

 T15709.hs:10:26: error:
     • Expected kind ‘* -> b -> p * b’, but ‘p’ has kind ‘* -> * -> *’
     • In the first argument of ‘Contravariant’, namely
         ‘(p :: * -> b -> p * b)’
       In the type signature:
         dimap :: (Contravariant (p :: * -> b -> p * b), Functor (p a)) =>
                  (z -> a) -> (b -> c) -> p a b -> p z c
    |
 10 | dimap :: (Contravariant (p :: * -> b -> p * b), Functor (p a)) => (z
 -> a)  -> (b -> c) -> p a b -> p z c
    |                          ^
 }}}

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


More information about the ghc-tickets mailing list