Proposal: GHC.Generics marked UNSAFE for SafeHaskell
Ryan Newton
rrnewton
Mon Oct 7 15:06:30 UTC 2013
> Here?s a thought: doesn?t Generic already have an unused phantom type
> that's only there ?just in case we need to add something in the future??
> How about using that to track whether an instance was derived or not, and
> enforce *that* with SafeHaskell? Your SafeEq can then use a Generic
> Derived constraint or whatever.
>
Ah this sounds promising. You mean that 'x' param in from/to? So to use
that, whereever I call to/from I would have to constrain that x to be
"Derived".
But do I understand correctly that GHC would have to modified so that its
derived instances of Generic force that x param to be Derived?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131007/4af027e7/attachment.html>
More information about the Libraries
mailing list