[GHC] #11056: Need to generate Typable info for promoted data constructors
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 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: -------------------------------------+------------------------------------- Trac #10052 isn't relevant for HEAD, because HEAD generates implicit `Typeable` bindings for everything. But in testing {{{ {-# LANGUAGE PolyKinds, DataKinds #-} module Foo where import Data.Typeable data T = A | B Int bar :: TypeRep bar = typeRep (Proxy :: Proxy '[True]) }}} I discovered that we aren't generating tycon-rep bindings for promoted data constructors. As a result we get {{{ GHC error in desugarer lookup in Foo: Can't find interface-file declaration for variable tc'[] Probable cause: bug in .hi-boot file, or inconsistent .hi file Use -ddump-if-trace to get an idea of which file caused the error }}} In particular `TcTypeable.mkTypeableBinds` doesn't generate the bindings for the `tc'[]` and `tc':`. It's not hard to fix this, but it will add more top-level declarations for each data type decl. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I can't reproduce this issue anymore on GHC HEAD (probably due to #11120 being fixed). Should we just close this as fixed, or should a test be added for `typeRep (Proxy :: Proxy '[True])`? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1823 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D1823 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1823 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"4e04043d1bb458439d3c3db3ffa9851bff780083/ghc" 4e04043d/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="4e04043d1bb458439d3c3db3ffa9851bff780083" Add test for Trac #11056 Reviewers: thomie, austin, bgamari Reviewed By: bgamari Subscribers: rwbarton Differential Revision: https://phabricator.haskell.org/D1823 GHC Trac Issues: #11056 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1823 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11056: Need to generate Typable info for promoted data constructors -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1823 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 46d784021737912706f21fcee40e3750dc2dcd9c. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11056#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC