Commits

Bryan O'Sullivan  committed 8ad37ab

Drop use of unqualified Vector.

  • Participants
  • Parent commits 32c7576

Comments (0)

Files changed (1)

File Data/Vectro.hs

 
 import Control.DeepSeq
 import Data.Bits hiding (shift)
-import Data.Vector (Vector)
 import qualified Data.Vector as V
 import Debug.Trace
 
-data Vect a = Node !Int !(Vector (Vect a))
-            | Leaf !(Vector a)
+data Vect a = Node !Int !(V.Vector (Vect a))
+            | Leaf !(V.Vector a)
               deriving (Eq, Ord)
 
 instance NFData a => NFData (V.Vector a) where
 mask = 0x3
 {-# INLINE mask #-}
 
-fromVector :: Vector a -> Vect a
+fromVector :: V.Vector a -> Vect a
 fromVector v0
     | len0 <= factor = Leaf v0
     | otherwise      = toTree shift (numChildren len0) (leaves v0 len0)
               | V.length v < factor -> Left $! Node s (v `V.snoc` n')
               | otherwise           -> Right $! Node s (V.singleton n')
 
-snocChunk :: Vect a -> Vector a -> Vect a
+snocChunk :: Vect a -> V.Vector a -> Vect a
 snocChunk t c = case go t of
                   Left n' -> n'
                   Right n' -> Node (shift+shiftOf n') (V.fromList [t,n'])
                          | otherwise           -> Right $! Node s (V.singleton n')
     l = Leaf c
 
-data Zipper a = Z !(Vect a) !Int !(Vector a)
+data Zipper a = Z !(Vect a) !Int !(V.Vector a)
 
 instance Show a => Show (Zipper a) where
     show (Z v k c) = "Z " ++ show v ++ " " ++ show k ++ " " ++ show (V.toList c)