Commits

Aleksey Khudyakov committed de8449e

Add missing Typeable instances

  • Participants
  • Parent commits daba97a

Comments (0)

Files changed (2)

File Data/Vector/Fixed/Primitive.hs

 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE ScopedTypeVariables   #-}
+{-# LANGUAGE DeriveDataTypeable    #-}
 -- |
 -- Unboxed vectors with fixed length. Vectors from
 -- "Data.Vector.Fixed.Unboxed" provide more flexibility at no
   ) where
 
 import Control.Monad
+import Data.Typeable            (Typeable)
 import Data.Primitive.ByteArray
 import Data.Primitive
 import Prelude hiding (length,replicate,zipWith,map,foldl)
 
 -- | Unboxed vector with fixed length
 newtype Vec n a = Vec ByteArray
+                  deriving (Typeable)
 
 -- | Mutable unboxed vector with fixed length
 newtype MVec n s a = MVec (MutableByteArray s)
+                     deriving (Typeable)
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))

File Data/Vector/Fixed/Storable.hs

 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE ScopedTypeVariables   #-}
+{-# LANGUAGE DeriveDataTypeable    #-}
 -- |
 -- Storable-based unboxed vectors.
 module Data.Vector.Fixed.Storable (
   ) where
 
 import Control.Monad.Primitive
+import Data.Typeable         (Typeable)
 import Foreign.Storable
 import Foreign.ForeignPtr
 import Foreign.Marshal.Array ( advancePtr, copyArray, moveArray )
 
 -- | Storable-based vector with fixed length
 newtype Vec n a = Vec (ForeignPtr a)
+                  deriving (Typeable)
 
 -- | Storable-based mutable vector with fixed length
 newtype MVec n s a = MVec (ForeignPtr a)
+                     deriving (Typeable)
 
 type Vec2 = Vec (S (S Z))
 type Vec3 = Vec (S (S (S Z)))