diff --git a/vector/src/Data/Vector/Generic/Base.hs b/vector/src/Data/Vector/Generic/Base.hs index afb78782..e1055f81 100644 --- a/vector/src/Data/Vector/Generic/Base.hs +++ b/vector/src/Data/Vector/Generic/Base.hs @@ -28,6 +28,9 @@ module Data.Vector.Generic.Base ( import Data.Vector.Generic.Mutable.Base ( MVector ) import qualified Data.Vector.Generic.Mutable.Base as M import Data.Vector.Fusion.Util (Box(..), liftBox) +import qualified Data.Primitive.Array as Prim +import qualified Data.Primitive.SmallArray as Prim +import qualified Data.Primitive.PrimArray as Prim import Control.Monad.ST import Data.Kind (Type) @@ -36,6 +39,11 @@ import Data.Kind (Type) -- the state token @s@. It is injective on GHC 8 and newer. type family Mutable (v :: Type -> Type) = (mv :: Type -> Type -> Type) | mv -> v +type instance Mutable Prim.Array = Prim.MutableArray +type instance Mutable Prim.SmallArray = Prim.SmallMutableArray +type instance Mutable Prim.PrimArray = Prim.MutablePrimArray + + -- | Class of immutable vectors. Every immutable vector is associated with its -- mutable version through the 'Mutable' type family. Methods of this class -- should not be used directly. Instead, "Data.Vector.Generic" and other