[Haskell-cafe] Synthetic values?
alexey.skladnoy at gmail.com
Wed Feb 9 22:01:39 CET 2011
On 09.02.2011 23:16, Cristiano Paris wrote:
> On Wed, Feb 9, 2011 at 19:33, Alexey Khudyakov
> <alexey.skladnoy at gmail.com> wrote:
>> If Private is not exported one cannot add instances to PRead.
> Nice trick. I would have thought of hiding the classes PRead and
> PWrite but I'm not sure if it could break the code.
It shouldn't but it would be impossible to write signatures for
polymorphic functions which use thoose type classes.
foo :: PWrite p => Sealed p Int <-- impossible to write
foo = ...
More information about the Haskell-Cafe