
#9858: Typeable instances should be kind-aware -------------------------------------+------------------------------------- Reporter: dreixel | Owner: Type: bug | Status: merge Priority: highest | Milestone: 7.10.2 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: | typecheck/should_fail/T9858a, | should_run/T9858b | Blocking: | Differential Revisions: Phab:D652 -------------------------------------+------------------------------------- Comment (by goldfire): After some discussion, we propose the following: * Restore `Typeable` for constraints. * Forbid `Typeable` for types with `=>`, as those types are higher-rank- ish. * Ensure that the `TypeRep`s for `() :: *` and `() :: Constraint` are distinct, and similarly for higher arities. This seems to solve the problems stated here. For what it's worth, I agree the statements in comment:92, but we can do the trick for all arities, not just 0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9858#comment:93 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler