
#9858: Typeable instances should be kind-aware -------------------------------------+------------------------------------- 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 oerjan): Replying to [comment:34 int-e]:
One such drawback is that the `Kindable'` constraint is sort of infectious. One can using a type family for mapping kinds to types, which seems to overcome that particular shortcoming:
This is already better, but also: Wouldn't this type family become redundant if we had Richard's identification of types and kinds? Assuming this also means you can have classes with only kind parameters, you could possibly get rid of the need for all the `Proxy`s and `UndecidableInstances` as well? At which point this starts to seem a lot prettier. Since I didn't give much comments in my previous version, the main ideas were: 1. Including the kind of a type in its `TTypeRep` already at construction may not have the typing problems that the wiki page describes for a "polymorphic typerep" with separately applied kindrep arguments. 2. You can construct representations for kinds already in current GHC code, although there's boilerplate because you cannot use kinds as "naked" parameters. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9858#comment:38 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler