Need to generate Typable info for promoted data constructors
Trac #10052 (closed) 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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |