[GHC] #11442: Segfault when showing (undefined :: Type)

GHC ghc-devs at haskell.org
Sat Jan 16 21:19:01 UTC 2016


#11442: Segfault when showing (undefined :: Type)
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.1
           Keywords:                 |  Operating System:  Linux
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This [https://ghc.haskell.org/trac/ghc/ticket/11311?replyto=3#comment:3
 comment] made me wonder about the relationship between `Void` and `Type`,
 `id :: Void -> Void` and `id :: Type -> Type`:

 https://ghc.haskell.org/trac/ghc/ticket/11311?replyto=3#comment:3

 {{{#!hs
 {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-

 import Data.Kind (Type)

 instance Show Type where
   show _ = "..."

 main = print (undefined :: Type)
 }}}

 running gives:

 {{{
 $ runghc --version
 runghc 8.1.20160113
 $ runghc -ignore-dot-ghci Segfault.hs
 Segmentation fault (core dumped)
 }}}

 Verbose log attached.

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


More information about the ghc-tickets mailing list