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

#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

#11442: Segfault when showing (undefined :: Type) -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | 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: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * Attachment "Segfault.log" added. runghc -v3 -ignore-dot-ghci /tmp/Segfault.hs &> /tmp/Segfault.log -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11442 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11442: Segfault when showing (undefined :: Type) -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: duplicate | 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: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => duplicate Comment: This was fixed yesterday. (Dup of #11311). In answer to your question: `Void` and `Type` are both (currently) empty in terms. But `Void` is also empty in types, whereas `Type` is (obviously) not. Do not use `Type` as a substitution for `Void`, please, though, as the long-term plan includes inhabiting `Type` in terms. After all, `Type` and `TypeRep` really should be the same. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11442#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11442: Segfault when showing (undefined :: Type) -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: duplicate | 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: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: @@ -1,3 +1,3 @@ - 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`: + This [https://ghc.haskell.org/trac/ghc/ticket/11311#comment:3 comment] + made me wonder about the relationship between `Void` and `Type`, `id :: + Void -> Void` and `id :: Type -> Type`: New description: This [https://ghc.haskell.org/trac/ghc/ticket/11311#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#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC