[GHC] #9858: Typeable instances should be kind-aware
GHC
ghc-devs at haskell.org
Tue Jan 27 17:56:26 UTC 2015
#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 int-e):
Replying to [comment:25 dreixel]:
> How about just marking `Typeable` instances for polykinded type
constructors as Unsafe (if that's possible)?
Given how notoriously hard it is to control exports of instances, that
won't be enough. To make things worse, the offending instance used here
(for {{{Proxy}}}) is derived in {{{Data.Typeable.Internal}}}, which is
marked {{{Trustworthy}}}. So conscientious users of safe Haskell would not
be able to trust the base package anymore, rendering safe Haskell all but
useless.
I guess the right way to leverage safe Haskell is to mark
{{{Data.Typeable}}} as unsafe, and explain the situation in a big comment.
It would still be a pain to track uses of {{{Data.Typeable}}} in
{{{Trustworthy}}} modules of other libraries (say, lens and its
dependencies).
I'm afraid there is no good interim solution here. I favor spj's
suggestion, but #9111 suggests that some people actually use
{{{Typeable}}} for {{{Proxy}}}.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9858#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list