[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 <ben@…>): In [changeset:"2e6433af56a97ad9c501648afa5e1d8c6c17f82a/ghc" 2e6433a/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2e6433af56a97ad9c501648afa5e1d8c6c17f82a" testsuite: Add a TypeRep test Test Plan: Validate Reviewers: goldfire, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2239 GHC Trac Issues: #12082, #11120 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12082#comment:2> 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 <ben@…>): In [changeset:"a88bb1b1518389817583290acaebfd6454aa3cec/ghc" a88bb1b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a88bb1b1518389817583290acaebfd6454aa3cec" Give lifted primitive types a representation As of D1774 everything in GHC.Prim has a representation generated for it by TcTypeable (see #11120). Unfortunately I evidently missed propagating this change to lifted primitive types. This patch fixes this (#12082). Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2240 GHC Trac Issues: #12082 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12082#comment:3> 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: 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 <ben@…>): In [changeset:"93acc02f7db7eb86967b4ec586359f408d62f75d/ghc" 93acc02f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="93acc02f7db7eb86967b4ec586359f408d62f75d" Add another testcase for #12082 Test Plan: Validate, should pass. Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2399 GHC Trac Issues: #12082 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12082#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC