[GHC] #14933: DeriveAnyClass can cause "No skolem info" GHC panic

GHC ghc-devs at haskell.org
Sat Mar 17 22:59:21 UTC 2018


#14933: DeriveAnyClass can cause "No skolem info" GHC panic
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:                    |             Keywords:  deriving
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by monoidal):

 Smaller version:

 {{{
 {-# LANGUAGE DefaultSignatures          #-}
 {-# LANGUAGE DeriveAnyClass             #-}
 {-# LANGUAGE TypeFamilies               #-}
 module Bug where

 class Wrapped s where
   type Unwrapped s :: *

 class Fork m where
     fork :: (x, m)

     default fork :: ( Wrapped m
                     , Unwrapped m ~ t
                     , Fork t
                     ) => (x, m)
     fork = undefined

 newtype MyThing m = MyThing m
     deriving (Fork)

 instance Wrapped (MyThing m) where
     type Unwrapped (MyThing m) = m
 }}}

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


More information about the ghc-tickets mailing list