diff --git a/benchmark/Streamly/Benchmark/Data/ParserK.hs b/benchmark/Streamly/Benchmark/Data/ParserK.hs index 2d0f4b1d4b..8f32030be3 100644 --- a/benchmark/Streamly/Benchmark/Data/ParserK.hs +++ b/benchmark/Streamly/Benchmark/Data/ParserK.hs @@ -390,7 +390,7 @@ sepBy1 value = withStreamK value $ \xs -> do x <- p fmap (x :) $ AP.many (sep >> p) --- O(n) heap beacuse of accumulation of the list in strict IO monad? +-- O(n) heap because of accumulation of the list in strict IO monad? o_n_heap_serial :: Int -> [(SpaceComplexity, Benchmark)] o_n_heap_serial value = [ @@ -412,7 +412,7 @@ o_n_heap_serial value = , (HeapO_n, benchIO "monad16" $ monad16 value) ] --- O(n) heap beacuse of accumulation of the list in strict IO monad? +-- O(n) heap because of accumulation of the list in strict IO monad? o_1_space_recursive :: Int -> [(SpaceComplexity, Benchmark)] o_1_space_recursive value = [ (SpaceO_1, benchIO "one (recursive)" $ one value) diff --git a/benchmark/Streamly/Benchmark/Data/Stream/Prelude/Exceptions.hs b/benchmark/Streamly/Benchmark/Data/Stream/Prelude/Exceptions.hs index 04f65a8317..fd343f5fbe 100644 --- a/benchmark/Streamly/Benchmark/Data/Stream/Prelude/Exceptions.hs +++ b/benchmark/Streamly/Benchmark/Data/Stream/Prelude/Exceptions.hs @@ -231,7 +231,7 @@ takeInterval :: Double -> Int -> IO () takeInterval i value = withStream value $ drain . Stream.takeInterval i -- Inspection testing is disabled for takeInterval --- Enable it when looking at it throughly +-- Enable it when looking at it thoroughly #ifdef INSPECTION -- inspect $ hasNoType 'takeInterval ''SPEC -- inspect $ hasNoTypeClasses 'takeInterval @@ -243,7 +243,7 @@ dropInterval :: Double -> Int -> IO () dropInterval i value = withStream value $ drain . Stream.dropInterval i -- Inspection testing is disabled for dropInterval --- Enable it when looking at it throughly +-- Enable it when looking at it thoroughly #ifdef INSPECTION -- inspect $ hasNoTypeClasses 'dropInterval -- inspect $ 'dropInterval `hasNoType` ''D.Step diff --git a/benchmark/Streamly/Benchmark/Data/StreamK/FromStream.hs b/benchmark/Streamly/Benchmark/Data/StreamK/FromStream.hs index 95f40720b9..ef6d9e59e5 100644 --- a/benchmark/Streamly/Benchmark/Data/StreamK/FromStream.hs +++ b/benchmark/Streamly/Benchmark/Data/StreamK/FromStream.hs @@ -1153,7 +1153,7 @@ o_n_heap_transformer value = moduleName :: String moduleName = "Data.StreamK.FromStream" --- Generation of StreamK using StreamD generation functions and eleminating +-- Generation of StreamK using StreamD generation functions and eliminating -- using StreamK drain. o_1_space_generation :: Int -> Benchmark o_1_space_generation streamLen = diff --git a/benchmark/Streamly/Benchmark/Data/Unfold.hs b/benchmark/Streamly/Benchmark/Data/Unfold.hs index 3189d6a8d4..b520036b37 100644 --- a/benchmark/Streamly/Benchmark/Data/Unfold.hs +++ b/benchmark/Streamly/Benchmark/Data/Unfold.hs @@ -132,7 +132,7 @@ inspect $ 'fromStream `hasNoType` ''FL.Step inspect $ 'fromStream `hasNoType` ''SPEC #endif --- XXX INVESTIGATE: Although the performance of this should be equivalant to +-- XXX INVESTIGATE: Although the performance of this should be equivalent to -- fromStream, this is considerably worse. More than 4x worse. {-# INLINE fromStreamK #-} fromStreamK :: Int -> Int -> IO () diff --git a/core/src/Streamly/Control/Exception.hs b/core/src/Streamly/Control/Exception.hs index 6ed0e08594..78a824655a 100644 --- a/core/src/Streamly/Control/Exception.hs +++ b/core/src/Streamly/Control/Exception.hs @@ -8,7 +8,7 @@ -- Stability : released -- Portability : GHC -- --- Exception handling and resource managment operations complementing +-- Exception handling and resource management operations complementing -- the "Control.Exception" module in base package. module Streamly.Control.Exception @@ -20,7 +20,7 @@ module Streamly.Control.Exception -- $setup -- -- * Resource Management - -- | Exception safe, thread safe resource managment operations, similar to + -- | Exception safe, thread safe resource management operations, similar to -- but more powerful than the @bracket@ and @finally@ operations available -- in the base package. -- diff --git a/core/src/Streamly/FileSystem/Path.hs b/core/src/Streamly/FileSystem/Path.hs index 757c4e2fde..f223714a04 100644 --- a/core/src/Streamly/FileSystem/Path.hs +++ b/core/src/Streamly/FileSystem/Path.hs @@ -29,7 +29,7 @@ -- from an explicit or implicit file system root is called a rooted path or an -- anchored path. For example, @\/usr\/bin@ is a rooted path with @/@ as an -- explicit root directory. Similarly, @.\/bin@ is a rooted path with the --- current directoy \".\" as an implicit root. A path that is not rooted is +-- current directory \".\" as an implicit root. A path that is not rooted is -- called an unrooted path or unanchored path; for example, @local\/bin@ is an -- unrooted path. -- diff --git a/core/src/Streamly/Internal/Control/Exception.hs b/core/src/Streamly/Internal/Control/Exception.hs index 3bcad5c48c..40e1f6fd91 100644 --- a/core/src/Streamly/Internal/Control/Exception.hs +++ b/core/src/Streamly/Internal/Control/Exception.hs @@ -17,7 +17,7 @@ module Streamly.Internal.Control.Exception , verifyM -- * Resource Management - -- | Exception safe, thread safe resource managment operations, similar to + -- | Exception safe, thread safe resource management operations, similar to -- but more powerful than the @bracket@ and @finally@ operations available -- in the base package. -- @@ -194,7 +194,7 @@ releaser ref = -- | @withAcquireIO action@ runs the given @action@, providing it with a -- an 'AcquireIO' reference called @ref@ as argument. @ref@ is used for resource --- acquisition or hook registeration within the scope of @action@. An @acquire +-- acquisition or hook registration within the scope of @action@. An @acquire -- ref alloc free@ call can be used within @action@ any number of times to -- acquire resources that are automatically freed when the scope of @action@ -- ends or if an exception occurs at any time. @alloc@ is a function supplied diff --git a/core/src/Streamly/Internal/Data/CString.hs b/core/src/Streamly/Internal/Data/CString.hs index e64dcf950d..20a87302dc 100644 --- a/core/src/Streamly/Internal/Data/CString.hs +++ b/core/src/Streamly/Internal/Data/CString.hs @@ -50,7 +50,7 @@ length (MutByteArray src#) = do -- | Join two null terminated cstrings, the null byte of the first string is -- overwritten. Does not check the destination length or source length. --- Destination must have enough space to accomodate src. +-- Destination must have enough space to accommodate src. -- -- Returns the offset of the null byte. -- diff --git a/core/src/Streamly/Internal/Data/Fold/Container.hs b/core/src/Streamly/Internal/Data/Fold/Container.hs index b5ea5fd736..dbe3db5812 100644 --- a/core/src/Streamly/Internal/Data/Fold/Container.hs +++ b/core/src/Streamly/Internal/Data/Fold/Container.hs @@ -909,7 +909,7 @@ demuxKvToMap = demuxKvToContainer -- done then initial would set a flag in the state to ignore the input or -- return an error. --- XXX Use a Refold m k a b so that we can make the fold key specifc. +-- XXX Use a Refold m k a b so that we can make the fold key specific. -- XXX Is using a function (a -> k) better than using the input (k,a)? {-# DEPRECATED classifyGeneric "Use classifyScanGeneric instead" #-} diff --git a/core/src/Streamly/Internal/Data/Fold/Type.hs b/core/src/Streamly/Internal/Data/Fold/Type.hs index c1604da763..b4fd8b0a0b 100644 --- a/core/src/Streamly/Internal/Data/Fold/Type.hs +++ b/core/src/Streamly/Internal/Data/Fold/Type.hs @@ -1716,7 +1716,7 @@ scanWith isMany scan :: Monad m => Fold m a b -> Fold m b c -> Fold m a c scan = scanWith False --- XXX This does not fuse beacuse of the recursive step. Need to investigate. +-- XXX This does not fuse because of the recursive step. Need to investigate. -- -- | Scan the input of a 'Fold' to change it in a stateful manner using another -- 'Fold'. The scan restarts with a fresh state if the fold terminates. @@ -1793,7 +1793,7 @@ scanlWith isMany scanl :: Monad m => Scanl m a b -> Fold m b c -> Fold m a c scanl = scanlWith False --- XXX This does not fuse beacuse of the recursive step. Need to investigate. +-- XXX This does not fuse because of the recursive step. Need to investigate. -- | Scan the input of a 'Fold' to change it in a stateful manner using a -- 'Scanl'. The scan restarts with a fresh state if it terminates. diff --git a/core/src/Streamly/Internal/Data/Scanl/Container.hs b/core/src/Streamly/Internal/Data/Scanl/Container.hs index f619775ffe..f7fc1d0bea 100644 --- a/core/src/Streamly/Internal/Data/Scanl/Container.hs +++ b/core/src/Streamly/Internal/Data/Scanl/Container.hs @@ -582,7 +582,7 @@ demuxKvToMap = demuxKvToContainer -- done then initial would set a flag in the state to ignore the input or -- return an error. --- XXX Use a Refold m k a b so that we can make the fold key specifc. +-- XXX Use a Refold m k a b so that we can make the fold key specific. -- XXX Is using a function (a -> k) better than using the input (k,a)? -- -- XXX We can use the Scan drain step to drain the buffered map in the end. diff --git a/core/src/Streamly/Internal/Data/Serialize/TH/Bottom.hs b/core/src/Streamly/Internal/Data/Serialize/TH/Bottom.hs index ecdc89f9c8..9e425b4efd 100644 --- a/core/src/Streamly/Internal/Data/Serialize/TH/Bottom.hs +++ b/core/src/Streamly/Internal/Data/Serialize/TH/Bottom.hs @@ -421,7 +421,7 @@ xorCmp tag off arr = -- TODO: -- Will this be too much of a code bloat? -- Loop with the loop body unrolled? --- Serialize this in batches similar to batch comparision in xorCmp? +-- Serialize this in batches similar to batch comparison in xorCmp? serializeW8List :: Name -> Name -> [Word8] -> Q Exp serializeW8List off arr w8List = do [|let $(varP (makeN 0)) = $(varE off) diff --git a/core/src/Streamly/Internal/FileSystem/Dir.hs b/core/src/Streamly/Internal/FileSystem/Dir.hs index c75bada825..e7f06f0e9f 100644 --- a/core/src/Streamly/Internal/FileSystem/Dir.hs +++ b/core/src/Streamly/Internal/FileSystem/Dir.hs @@ -26,7 +26,7 @@ module Streamly.Internal.FileSystem.Dir -- , readAttrs -- recursive read requires us to read the attributes of the children to - -- determine if something is a dirctory or not. Therefore, it may be a good + -- determine if something is a directory or not. Therefore, it may be a good -- idea to have a low level routine that also spits out the attributes of -- the files, we get that for free. We can also add a filter/pattern/parser -- on the names of the children that we want to read. diff --git a/core/src/Streamly/Internal/FileSystem/DirIO.hs b/core/src/Streamly/Internal/FileSystem/DirIO.hs index 32959ba648..4272f72954 100644 --- a/core/src/Streamly/Internal/FileSystem/DirIO.hs +++ b/core/src/Streamly/Internal/FileSystem/DirIO.hs @@ -421,7 +421,7 @@ writeChunks h = FL.drainBy (liftIO . writeArray h) -- | @writeChunksWithBufferOf bufsize handle@ writes a stream of arrays -- to @handle@ after coalescing the adjacent arrays in chunks of @bufsize@. -- We never split an array, if a single array is bigger than the specified size --- it emitted as it is. Multiple arrays are coalesed as long as the total size +-- it emitted as it is. Multiple arrays are coalesced as long as the total size -- remains below the specified size. -- -- @since 0.7.0 diff --git a/core/src/Streamly/Internal/FileSystem/File.hs b/core/src/Streamly/Internal/FileSystem/File.hs index 4b8b2d426a..bd15531565 100644 --- a/core/src/Streamly/Internal/FileSystem/File.hs +++ b/core/src/Streamly/Internal/FileSystem/File.hs @@ -12,7 +12,7 @@ -- in the file system. Unlike the handle based APIs which can have a read/write -- session consisting of multiple reads and writes to the handle, these APIs -- are one shot read or write APIs. These APIs open the file handle, perform --- the requested operation and close the handle. Thease are safer compared to +-- the requested operation and close the handle. These are safer compared to -- the handle based APIs as there is no possibility of a file descriptor -- leakage. -- diff --git a/core/src/Streamly/Internal/FileSystem/Handle.hs b/core/src/Streamly/Internal/FileSystem/Handle.hs index 309d3485aa..ee3cbb436c 100644 --- a/core/src/Streamly/Internal/FileSystem/Handle.hs +++ b/core/src/Streamly/Internal/FileSystem/Handle.hs @@ -82,7 +82,7 @@ module Streamly.Internal.FileSystem.Handle -- include disks, files, memory devices and exclude terminals, pipes, -- sockets and fifos. - -- We can also generate the request pattern using a funciton. + -- We can also generate the request pattern using a function. -- -- , readIndex -- , readFrom -- read from a given position to the end of file @@ -448,7 +448,7 @@ writeChunks h = FL.drainMapM (putChunk h) -- | @writeChunksWith bufsize handle@ writes a stream of arrays -- to @handle@ after coalescing the adjacent arrays in chunks of @bufsize@. -- We never split an array, if a single array is bigger than the specified size --- it emitted as it is. Multiple arrays are coalesed as long as the total size +-- it emitted as it is. Multiple arrays are coalesced as long as the total size -- remains below the specified size. -- {-# INLINE writeChunksWith #-} diff --git a/core/src/Streamly/Internal/FileSystem/Path.hs b/core/src/Streamly/Internal/FileSystem/Path.hs index cc6844e9fb..0a70107abb 100644 --- a/core/src/Streamly/Internal/FileSystem/Path.hs +++ b/core/src/Streamly/Internal/FileSystem/Path.hs @@ -48,7 +48,7 @@ -- -- The Path module contains purely path manipulation code. WindowsPath and -- PosixPath have different type of handling but both the modules are available --- in all plaforms, therefore, you can manipulate Windows paths on Posix and +-- in all platforms, therefore, you can manipulate Windows paths on Posix and -- vice-versa. Because of this the operations that require platform specific IO -- system calls are placed in the PathIO module which is available only on the -- current platform for which the library is built. diff --git a/core/src/Streamly/Internal/FileSystem/Path/Common.hs b/core/src/Streamly/Internal/FileSystem/Path/Common.hs index f4fb96deda..de82804f75 100644 --- a/core/src/Streamly/Internal/FileSystem/Path/Common.hs +++ b/core/src/Streamly/Internal/FileSystem/Path/Common.hs @@ -176,7 +176,7 @@ data OS = Windows | Posix deriving Eq -- functions can work on Array Word8/Word16/Char but that may be slow. -- XXX Windows is supported only on little endian machines so generally we do --- not need covnersion from LE to BE format unless we want to manipulate +-- not need conversion from LE to BE format unless we want to manipulate -- windows paths on big-endian machines. -- | Unsafe, may tructate to shorter word types, can only be used safely for @@ -367,7 +367,7 @@ isRelativeCurDir os a -- separators. Such a path is relative to current drive root. Note that -- "\\/share/x" is treated as "C:/share/x" because UNC or share name starts -- with EXACTLY two separators, more than two separators are just a sequence of --- separators which can be collpased into a single separator. +-- separators which can be collapsed into a single separator. isRelativeCurDriveRoot :: (Unbox a, Integral a) => Array a -> Bool isRelativeCurDriveRoot a | len == 0 = False -- empty path should not occur @@ -712,7 +712,7 @@ splitRoot Windows arr -- Split path ------------------------------------------------------------------------------ --- | Raw split an array on path separartor word using a filter to filter out +-- | Raw split an array on path separator word using a filter to filter out -- some splits. {-# INLINE splitWithFilter #-} splitWithFilter @@ -1963,7 +1963,7 @@ normalise decoder os eqCfg@EqCfg{..} p -- | Return the longest common, non-empty, prefix of two paths. Path prefix is -- compared using normalization. Dot dot components are not collapsed because --- of symlink possiblities. +-- of symlink possibilities. -- -- The result, if present, is a valid path that is a prefix of both inputs. -- Returns 'Nothing' if there is no common prefix or if the common prefix is empty. diff --git a/core/src/Streamly/Internal/FileSystem/PosixPath.hs b/core/src/Streamly/Internal/FileSystem/PosixPath.hs index d76a593ff5..c4b008d71e 100644 --- a/core/src/Streamly/Internal/FileSystem/PosixPath.hs +++ b/core/src/Streamly/Internal/FileSystem/PosixPath.hs @@ -307,7 +307,7 @@ instance IsPath OS_PATH OS_PATH where #endif -- XXX Use rewrite rules to eliminate intermediate conversions for better --- efficiency. If the argument path is already verfied for a property, we +-- efficiency. If the argument path is already verified for a property, we -- should not verify it again e.g. if we adapt (Rooted path) as (Rooted (Dir -- path)) then we should not verify it to be Rooted again. @@ -1633,7 +1633,7 @@ allowRelativeEquality val conf = conf { _allowRelativeEquality = val } -- components even if we determined them to be unequal. However, if we -- determined them to be equal then they must be equal. -- --- Using default config with case sensitive comparision, if eqPath returns +-- Using default config with case sensitive comparison, if eqPath returns -- equal then the paths are definitely equal, if it returns unequal then the -- paths may still be equal under some relaxed equality criterion. -- @@ -1994,7 +1994,7 @@ data PackPathsState = -- The first argument specifies the initial output buffer size in bytes, if the -- size is close to the block size it may be rounded to the block size. The -- buffer is grown further only if even one path can not fit into it. The fold --- terminates when no more space is left in the buffer to accomodate more +-- terminates when no more space is left in the buffer to accommodate more -- paths. -- {-# INLINE packPathsEndBy #-} diff --git a/core/src/Streamly/Internal/FileSystem/WindowsPath.hs b/core/src/Streamly/Internal/FileSystem/WindowsPath.hs index 139d49f5d5..b4bb632bca 100644 --- a/core/src/Streamly/Internal/FileSystem/WindowsPath.hs +++ b/core/src/Streamly/Internal/FileSystem/WindowsPath.hs @@ -484,7 +484,7 @@ data PackPathsState = -- The first argument specifies the initial output buffer size in bytes, if the -- size is close to the block size it may be rounded to the block size. The -- buffer is grown further only if even one path can not fit into it. The fold --- terminates when no more space is left in the buffer to accomodate more +-- terminates when no more space is left in the buffer to accommodate more -- paths. {-# INLINE packPathsEndBy #-} packPathsEndBy :: diff --git a/core/src/Streamly/Internal/Syscall/Posix/File.hsc b/core/src/Streamly/Internal/Syscall/Posix/File.hsc index e430942dce..11b29d3445 100644 --- a/core/src/Streamly/Internal/Syscall/Posix/File.hsc +++ b/core/src/Streamly/Internal/Syscall/Posix/File.hsc @@ -107,7 +107,7 @@ import qualified System.Posix.Internals as Posix -- We want to remain close to the Posix C API. A function based API to set and -- clear the modes is simple, type safe and directly mirrors the C API. It does --- not require explicit mapping from Haskell ADT to C types, we can dirctly +-- not require explicit mapping from Haskell ADT to C types, we can directly -- manipulate the C type. #include diff --git a/core/src/Streamly/Internal/Syscall/Posix/ReadDir.hsc b/core/src/Streamly/Internal/Syscall/Posix/ReadDir.hsc index cc2a297fbc..1a102a703d 100644 --- a/core/src/Streamly/Internal/Syscall/Posix/ReadDir.hsc +++ b/core/src/Streamly/Internal/Syscall/Posix/ReadDir.hsc @@ -122,7 +122,7 @@ readPlusScanWith = undefined -- XXX Marking the calls "safe" has significant perf impact because it runs on -- a separate OS thread. "unsafe" is faster but can block the GC if the system --- call blocks. The effect could be signifcant if the file system is on NFS. Is +-- call blocks. The effect could be significant if the file system is on NFS. Is -- it possible to have a faster safe - where we know the function is safe but -- we run it on the current thread, and if it blocks for longer we can snatch -- the capability and enable GC? diff --git a/core/src/Streamly/Internal/Syscall/Windows/File.hsc b/core/src/Streamly/Internal/Syscall/Windows/File.hsc index b874850f20..e1da5448d2 100644 --- a/core/src/Streamly/Internal/Syscall/Windows/File.hsc +++ b/core/src/Streamly/Internal/Syscall/Windows/File.hsc @@ -1,4 +1,4 @@ --- XXX When introducing platform specifc API, see Posix/File.hsc and design in +-- XXX When introducing platform specific API, see Posix/File.hsc and design in -- the same consistent way. module Streamly.Internal.Syscall.Windows.File ( diff --git a/core/src/Streamly/Internal/Syscall/Windows/ReadDir.hsc b/core/src/Streamly/Internal/Syscall/Windows/ReadDir.hsc index b9a7a0a802..43dc09e8a9 100644 --- a/core/src/Streamly/Internal/Syscall/Windows/ReadDir.hsc +++ b/core/src/Streamly/Internal/Syscall/Windows/ReadDir.hsc @@ -171,7 +171,7 @@ foreign import ccall unsafe "wchar.h wcslen" c_wcslen_pinned -- This is defined here and not in Path module because wcslen is a platform -- specific function and uses 32-bit wide chars on posix and 16-bit wide chars -- on Windows. We cannot have it in WindowsPath module because that module is --- plaform agnostic and works on Posix as well. +-- platform agnostic and works on Posix as well. -- {-# INLINE appendW16CString #-} appendW16CString :: WindowsPath -> Ptr CWchar -> IO WindowsPath diff --git a/core/streamly-core.cabal b/core/streamly-core.cabal index b48eec6cbf..4c0a42cf16 100644 --- a/core/streamly-core.cabal +++ b/core/streamly-core.cabal @@ -293,7 +293,7 @@ common threading-options -- We need optimization options here to optimize internal (non-inlined) -- versions of functions. Also, we have some benchmarking inspection tests --- part of the library when built with --benchmarks flag. Thos tests fail +-- part of the library when built with --benchmarks flag. Those tests fail -- if we do not use optimization options here. It was observed that due to -- -O2 here some concurrent/nested benchmarks improved and others regressed. -- We can investigate a bit more here why the regression occurred. diff --git a/src/Streamly/Internal/Network/Socket.hs b/src/Streamly/Internal/Network/Socket.hs index 722ace7269..06563e04db 100644 --- a/src/Streamly/Internal/Network/Socket.hs +++ b/src/Streamly/Internal/Network/Socket.hs @@ -458,7 +458,7 @@ writeChunks h = FL.drainMapM (liftIO . putChunk h) -- | @writeChunksWith bufsize socket@ writes a stream of arrays to -- @socket@ after coalescing the adjacent arrays in chunks of @bufsize@. --- Multiple arrays are coalesed as long as the total size remains below the +-- Multiple arrays are coalesced as long as the total size remains below the -- specified size. It never splits an array, if a single array is bigger than -- the specified size it emitted as it is. -- diff --git a/streamly.cabal b/streamly.cabal index ebb1df642b..4db1b8d4ca 100644 --- a/streamly.cabal +++ b/streamly.cabal @@ -368,7 +368,7 @@ common threading-options -- We need optimization options here to optimize internal (non-inlined) -- versions of functions. Also, we have some benchmarking inspection tests --- part of the library when built with --benchmarks flag. Thos tests fail +-- part of the library when built with --benchmarks flag. Those tests fail -- if we do not use optimization options here. It was observed that due to -- -O2 here some concurrent/nested benchmarks improved and others regressed. -- We can investigate a bit more here why the regression occurred.