> 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?
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
