[GHC] #12082: Typeable on RealWorld fails

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: 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: -------------------------------------+------------------------------------- This, {{{#!hs import GHC.Prim import Data.Typeable main = print $ typeRep (Proxy :: Proxy RealWorld) }}} fails with, {{{ ghc: panic! (the 'impossible' happened) (GHC version 8.0.0.20160421 for x86_64-unknown-linux): tyConRep RealWorld Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Changes (by bgamari): * testcase: => typecheck/should_run/TypeRep * priority: normal => high * differential: => Phab:D2240, Phab:D2239 * status: new => patch * milestone: => 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_run/TypeRep
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2240,
Wiki Page: | Phab:D2239
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12082: Typeable on RealWorld fails
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_run/TypeRep
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2240,
Wiki Page: | Phab:D2239
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Typeable Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => Typeable -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Typeable Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Comment (by acfoltzer): We've somehow managed to run into this without using `typeRep` directly. Here is a shrink: {{{#!hs {-# LANGUAGE Rank2Types #-} import Data.Typeable (Typeable) import Control.Monad.ST (RealWorld) f :: forall a. (forall b. Typeable b => b -> a) -> a f = undefined :: (RealWorld -> a) -> a }}} {{{ % ghci Crash.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from ... [1 of 1] Compiling Main ( Crash.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-apple-darwin): tyConRep RealWorld Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Leaving GHCi. }}} We were able to get around it for our project (it turned out we didn't need to use `RealWorld` at all) but hopefully this test case helps validate the patch for this issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Typeable Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Comment (by simonpj): Ben: maybe worth adding this as another regression test? It looks a bit different to the original one, and it's small. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Typeable Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_run/TypeRep Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2240, Wiki Page: | Phab:D2239 -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 2c5a5fc14300e1615bde63f4ba63c98727442061. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12082#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12082: Typeable on RealWorld fails
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords: Typeable
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_run/TypeRep
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2240,
Wiki Page: | Phab:D2239
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC