Adding dataCast1 and dataCast2 methods to the Data instances of Ptr, ForeignPtr, and Array

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
participants (1)
-
José Pedro Magalhães