
#13435: Segfaults on levity-polymorphic type class -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# Language FlexibleInstances, TypeFamilies, TypeInType, MagicHash #-} import Data.Kind import GHC.Exts class Shw (a :: TYPE rep) where shw :: a -> String instance Int# ~ a => Shw (a :: TYPE IntRep) where shw a = "I#" ++ show (I# a) main = putStrLn (shw 3#) }}} induces a segfault {{{ $ runghc --version runghc 8.0.1 $ runghc test.hs I#Segmentation fault }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13435 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler