
#9858: Typeable instance for datatype and its promoted constructor is the same
-------------------------------------+-------------------------------------
Reporter: dreixel | Owner: dreixel
Type: bug | Status: new
Priority: highest | Milestone: 7.10.1
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by goldfire):
I see two different issues at work here:
1. If we have `data A = A`, then (typeRep (Proxy :: Proxy A)) and (typeRep
(Proxy :: Proxy 'A)) are equal. This is not a problem with kinds, but a
problem with namespaces. To me, the salient difference between `A` and
`'A` is not that their kinds are different, but that they represent
totally different entities. Fixing this issue is simple, either by adding
some namespace information to `TyCon` or putting some marker in the
`tyConName` string.
2. If we have `data B x` (no constructors), then `B :: forall k. k -> *`.
The types `(B :: Bool -> *)` and `(B :: Ordering -> *)` are actually, in
Core, `B Bool` and `B Ordering` -- in Core, kind arguments are explicit.
Thus, the `TypeRep` for `B :: Bool -> *` could feasibly be `TypeRep
<fingerprint> [