[GHC] #13601: GHC errors but hangs

GHC ghc-devs at haskell.org
Fri Apr 21 12:36:52 UTC 2017


#13601: GHC errors but hangs
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 I was running out the door when I submitted that, here is a more minimal
 example

 {{{#!hs
 {-# Language TypeFamilies, DataKinds, TypeInType #-}
 -- {-# Language FlexibleContexts, UndecidableSuperClasses #-}

 import GHC.Exts -- (TYPE, RuntimeRep)
 import Data.Kind

 type family
   Rep (rep :: RuntimeRep) :: RuntimeRep

 class Boolean (Logic a) => Eq' (a :: TYPE rep) where
   type Logic (a :: TYPE rep) :: TYPE (Rep rep)

 class Eq' a => MinBound (a :: TYPE rep) where

 class Eq' a => Lattice (a :: TYPE rep) where

 class (MinBound a, Lattice a) => Boolean a
 }}}

 It is fixed by uncommenting the final two pragmas and writing

 {{{#!hs
 class (MinBound a, Lattice a) => Boolean (a :: TYPE rep)
 }}}

 ----

 Alternatively, only commenting out `import GHC.Exts (TYPE, RuntimeRep)`
 gives us an ever-so-slightly different error

 {{{
 c.hs:10:16: error:
     • Expected kind
 }}}

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


More information about the ghc-tickets mailing list