diff --git a/old-testsuite/microsuite/Test.hs b/old-testsuite/microsuite/Test.hs index 3171f227..670d43d3 100644 --- a/old-testsuite/microsuite/Test.hs +++ b/old-testsuite/microsuite/Test.hs @@ -166,7 +166,7 @@ left_over_vector = compile "Data\\.Vector\\.Unboxed\\.Base\\.Vector" [] -- > > readProcess "date" [] [] -- > Right "Thu Feb 7 10:03:39 PST 2008\n" -- --- The argumenst are: +-- The arguments are: -- -- * The command to run, which must be in the $PATH, or an absolute path -- diff --git a/vector-stream/src/Data/Stream/Monadic.hs b/vector-stream/src/Data/Stream/Monadic.hs index 4e9a6fdc..b1cb7bd4 100644 --- a/vector-stream/src/Data/Stream/Monadic.hs +++ b/vector-stream/src/Data/Stream/Monadic.hs @@ -1561,7 +1561,7 @@ enumFromTo_double n m = n `seq` m `seq` Stream step ini lim = m + 1/2 -- important to float out -- GHC changed definition of Enum for Double in GHC8.6 so we have to --- accomodate both definitions in order to preserve validity of +-- accommodate both definitions in order to preserve validity of -- rewrite rule -- -- ISSUE: https://gitlab.haskell.org/ghc/ghc/issues/15081 diff --git a/vector/src/Data/Vector.hs b/vector/src/Data/Vector.hs index ab69cd6c..731494a3 100644 --- a/vector/src/Data/Vector.hs +++ b/vector/src/Data/Vector.hs @@ -1483,14 +1483,14 @@ findIndices :: (a -> Bool) -> Vector a -> Vector Int {-# INLINE findIndices #-} findIndices = G.findIndices --- | /O(n)/ Yield 'Just' the index of the first occurence of the given element or +-- | /O(n)/ Yield 'Just' the index of the first occurrence of the given element or -- 'Nothing' if the vector does not contain the element. This is a specialised -- version of 'findIndex'. elemIndex :: Eq a => a -> Vector a -> Maybe Int {-# INLINE elemIndex #-} elemIndex = G.elemIndex --- | /O(n)/ Yield the indices of all occurences of the given element in +-- | /O(n)/ Yield the indices of all occurrences of the given element in -- ascending order. This is a specialised version of 'findIndices'. elemIndices :: Eq a => a -> Vector a -> Vector Int {-# INLINE elemIndices #-} @@ -1563,7 +1563,7 @@ ifoldr' = G.ifoldr' -- | /O(n)/ Map each element of the structure to a monoid and combine -- the results. It uses the same implementation as the corresponding method --- of the 'Foldable' type cless. Note that it's implemented in terms of 'foldr' +-- of the 'Foldable' type class. Note that it's implemented in terms of 'foldr' -- and won't fuse with functions that traverse the vector from left to -- right ('map', 'generate', etc.). -- diff --git a/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs b/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs index a88242fd..d9d550fc 100644 --- a/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs +++ b/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs @@ -732,7 +732,7 @@ postscanl' :: Monad m => (a -> b -> a) -> a -> Bundle m v b -> Bundle m v a {-# INLINE postscanl' #-} postscanl' f = postscanlM' (\a b -> return (f a b)) --- | Suffix scan with strict acccumulator and a monadic operator +-- | Suffix scan with strict accumulator and a monadic operator postscanlM' :: Monad m => (a -> b -> m a) -> a -> Bundle m v b -> Bundle m v a {-# INLINE_FUSED postscanlM' #-} postscanlM' f z Bundle{sElems = s, sSize = sz} = fromStream (S.postscanlM' f z s) sz @@ -1024,7 +1024,7 @@ enumFromTo_double n m = n `seq` m `seq` fromStream (Stream step ini) (Max (len n {-# INLINE_INNER step #-} -- GHC changed definition of Enum for Double in GHC8.6 so we have to --- accomodate both definitions in order to preserve validity of +-- accommodate both definitions in order to preserve validity of -- rewrite rule -- -- ISSUE: https://gitlab.haskell.org/ghc/ghc/issues/15081 diff --git a/vector/src/Data/Vector/Generic.hs b/vector/src/Data/Vector/Generic.hs index 942d3b5c..88f41333 100644 --- a/vector/src/Data/Vector/Generic.hs +++ b/vector/src/Data/Vector/Generic.hs @@ -1637,14 +1637,14 @@ findIndices f = unstream . inplace (S.map fst . S.filter (f . snd) . S.indexed) toMax . stream --- | /O(n)/ Yield 'Just' the index of the first occurence of the given element or +-- | /O(n)/ Yield 'Just' the index of the first occurrence of the given element or -- 'Nothing' if the vector does not contain the element. This is a specialised -- version of 'findIndex'. elemIndex :: (Vector v a, Eq a) => a -> v a -> Maybe Int {-# INLINE elemIndex #-} elemIndex x = findIndex (x ==) --- | /O(n)/ Yield the indices of all occurences of the given element in +-- | /O(n)/ Yield the indices of all occurrences of the given element in -- ascending order. This is a specialised version of 'findIndices'. elemIndices :: (Vector v a, Vector v Int, Eq a) => a -> v a -> v Int {-# INLINE elemIndices #-} diff --git a/vector/src/Data/Vector/Primitive.hs b/vector/src/Data/Vector/Primitive.hs index 8c2f1a5b..e93863c4 100644 --- a/vector/src/Data/Vector/Primitive.hs +++ b/vector/src/Data/Vector/Primitive.hs @@ -1242,14 +1242,14 @@ findIndices :: Prim a => (a -> Bool) -> Vector a -> Vector Int {-# INLINE findIndices #-} findIndices = G.findIndices --- | /O(n)/ Yield 'Just' the index of the first occurence of the given element or +-- | /O(n)/ Yield 'Just' the index of the first occurrence of the given element or -- 'Nothing' if the vector does not contain the element. This is a specialised -- version of 'findIndex'. elemIndex :: (Prim a, Eq a) => a -> Vector a -> Maybe Int {-# INLINE elemIndex #-} elemIndex = G.elemIndex --- | /O(n)/ Yield the indices of all occurences of the given element in +-- | /O(n)/ Yield the indices of all occurrences of the given element in -- ascending order. This is a specialised version of 'findIndices'. elemIndices :: (Prim a, Eq a) => a -> Vector a -> Vector Int {-# INLINE elemIndices #-} diff --git a/vector/src/Data/Vector/Storable.hs b/vector/src/Data/Vector/Storable.hs index 036945be..89549074 100644 --- a/vector/src/Data/Vector/Storable.hs +++ b/vector/src/Data/Vector/Storable.hs @@ -1263,14 +1263,14 @@ findIndices :: Storable a => (a -> Bool) -> Vector a -> Vector Int {-# INLINE findIndices #-} findIndices = G.findIndices --- | /O(n)/ Yield 'Just' the index of the first occurence of the given element or +-- | /O(n)/ Yield 'Just' the index of the first occurrence of the given element or -- 'Nothing' if the vector does not contain the element. This is a specialised -- version of 'findIndex'. elemIndex :: (Storable a, Eq a) => a -> Vector a -> Maybe Int {-# INLINE elemIndex #-} elemIndex = G.elemIndex --- | /O(n)/ Yield the indices of all occurences of the given element in +-- | /O(n)/ Yield the indices of all occurrences of the given element in -- ascending order. This is a specialised version of 'findIndices'. elemIndices :: (Storable a, Eq a) => a -> Vector a -> Vector Int {-# INLINE elemIndices #-} @@ -1343,7 +1343,7 @@ ifoldr' = G.ifoldr' -- | /O(n)/ Map each element of the structure to a monoid and combine -- the results. It uses the same implementation as the corresponding method --- of the 'Foldable' type cless. Note that it's implemented in terms of 'foldr' +-- of the 'Foldable' type class. Note that it's implemented in terms of 'foldr' -- and won't fuse with functions that traverse the vector from left to -- right ('map', 'generate', etc.). -- diff --git a/vector/src/Data/Vector/Unboxed.hs b/vector/src/Data/Vector/Unboxed.hs index 59fb0701..17fe1757 100644 --- a/vector/src/Data/Vector/Unboxed.hs +++ b/vector/src/Data/Vector/Unboxed.hs @@ -1142,7 +1142,7 @@ dropWhile :: Unbox a => (a -> Bool) -> Vector a -> Vector a {-# INLINE dropWhile #-} dropWhile = G.dropWhile --- Parititioning +-- Partitioning -- ------------- -- | /O(n)/ Split the vector in two parts, the first one containing those @@ -1253,14 +1253,14 @@ findIndices :: Unbox a => (a -> Bool) -> Vector a -> Vector Int {-# INLINE findIndices #-} findIndices = G.findIndices --- | /O(n)/ Yield 'Just' the index of the first occurence of the given element or +-- | /O(n)/ Yield 'Just' the index of the first occurrence of the given element or -- 'Nothing' if the vector does not contain the element. This is a specialised -- version of 'findIndex'. elemIndex :: (Unbox a, Eq a) => a -> Vector a -> Maybe Int {-# INLINE elemIndex #-} elemIndex = G.elemIndex --- | /O(n)/ Yield the indices of all occurences of the given element in +-- | /O(n)/ Yield the indices of all occurrences of the given element in -- ascending order. This is a specialised version of 'findIndices'. elemIndices :: (Unbox a, Eq a) => a -> Vector a -> Vector Int {-# INLINE elemIndices #-}