17 Oct 2012 10:18
Adding dataCast1 and dataCast2 methods to the Data instances of Ptr, ForeignPtr, and Array
José Pedro Magalhães <jpm <at> cs.uu.nl>
2012-10-17 08:18:03 GMT
2012-10-17 08:18:03 GMT
Hello all,
This email is to draw your attention to http://hackage.haskell.org/trac/ghc/ticket/7256. Missing dataCast1 and dataCast2 methods in Data instances results in incorrect behaviour when using SYB's ext1/ext2 functions. The proposed fix adds the methods, but it requires adding additional Data constraints to these instances. Here's the relevant part of the diff:
-instance Typeable a => Data (Ptr a) where
+instance (Data a, Typeable a) => Data (Ptr a) where
-instance Typeable a => Data (ForeignPtr a) where
+instance (Data a, Typeable a) => Data (ForeignPtr a) where
-instance (Typeable a, Data b, Ix a) => Data (Array a b)
+instance (Typeable a, Data a, Data b, Ix a) => Data (Array a b)
Does anyone find this change problematic?
Cheers,
Pedro
_______________________________________________ Libraries mailing list Libraries <at> haskell.org http://www.haskell.org/mailman/listinfo/libraries
RSS Feed