Commits

Aleksey Khudyakov committed ccb1e63

Fix build for GHC 7.8

  • Participants
  • Parent commits 5c1d908

Comments (0)

Files changed (4)

File fixed-vector/Data/Vector/Fixed/Boxed.hs

+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE StandaloneDeriving    #-}
 {-# LANGUAGE TypeFamilies          #-}
 {-# LANGUAGE FlexibleInstances     #-}
 -- | Mutable unboxed vector with fixed length
 newtype MVec n s a = MVec (MutableArray s a)
 
+#if __GLASGOW_HASKELL__ >= 708
+deriving instance Typeable Vec
+deriving instance Typeable MVec
+#else
 deriving instance Typeable2 Vec
 deriving instance Typeable3 MVec
+#endif
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))

File fixed-vector/Data/Vector/Fixed/Primitive.hs

+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE StandaloneDeriving    #-}
 {-# LANGUAGE TypeFamilies          #-}
 {-# LANGUAGE FlexibleInstances     #-}
 -- | Mutable unboxed vector with fixed length
 newtype MVec n s a = MVec (MutableByteArray s)
 
+#if __GLASGOW_HASKELL__ >= 708
+deriving instance Typeable Vec
+deriving instance Typeable MVec
+#else
 deriving instance Typeable2 Vec
 deriving instance Typeable3 MVec
+#endif
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))

File fixed-vector/Data/Vector/Fixed/Storable.hs

+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE StandaloneDeriving    #-}
 {-# LANGUAGE TypeFamilies          #-}
 {-# LANGUAGE FlexibleInstances     #-}
 -- | Storable-based mutable vector with fixed length
 newtype MVec n s a = MVec (ForeignPtr a)
 
+#if __GLASGOW_HASKELL__ >= 708
+deriving instance Typeable Vec
+deriving instance Typeable MVec
+#else
 deriving instance Typeable2 Vec
 deriving instance Typeable3 MVec
+#endif
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))

File fixed-vector/Data/Vector/Fixed/Unboxed.hs

 data family Vec  n a
 data family MVec n s a
 
+#if __GLASGOW_HASKELL__ >= 708
+deriving instance Typeable Vec
+deriving instance Typeable MVec
+#else
 deriving instance Typeable2 Vec
 deriving instance Typeable3 MVec
+#endif
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))