[GHC] #13736: GHC panic with DataKinds and TypeOperators

GHC ghc-devs at haskell.org
Sun May 21 20:20:38 UTC 2017


#13736: GHC panic with DataKinds and TypeOperators
-------------------------------------+-------------------------------------
        Reporter:  turion            |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13106            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => closed
 * resolution:   => duplicate
 * related:   => #13106


Comment:

 Thanks for the bug report. This is a duplicate of #13106, and has been
 fixed in GHC 8.2.1, where you'll get this proper error message instead:

 {{{
 $ ~/Software/ghc/inplace/bin/ghc-stage2 Bug.hs
 [1 of 1] Compiling Main             ( Bug.hs, Bug.o )

 Bug.hs:1:1: error:
     The IO action ‘main’ is not defined in module ‘Main’
   |
 1 | {-# LANGUAGE DataKinds #-}
   | ^

 Bug.hs:11:11: error:
     • Found hole: _ :: a0
       Where: ‘a0’ is an ambiguous type variable
     • In the first argument of ‘Main.Foo’, namely ‘_’
       In the expression: Main.Foo _
       In an equation for ‘Main.foo’: Main.foo = Main.Foo _
     • Relevant bindings include
         foo :: Main.Foo (Main.Proxy (2 * 2)) (bound at Bug.hs:11:1)
    |
 11 | foo = Foo _
    |           ^
 }}}

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


More information about the ghc-tickets mailing list