Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmark/Streamly/Benchmark/Data/ParserK.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
[
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Streamly/Benchmark/Data/StreamK/FromStream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Streamly/Benchmark/Data/Unfold.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
4 changes: 2 additions & 2 deletions core/src/Streamly/Control/Exception.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
--
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/FileSystem/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
4 changes: 2 additions & 2 deletions core/src/Streamly/Internal/Control/Exception.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Data/CString.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Data/Fold/Container.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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" #-}
Expand Down
4 changes: 2 additions & 2 deletions core/src/Streamly/Internal/Data/Fold/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Data/Scanl/Container.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Data/Serialize/TH/Bottom.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/FileSystem/Dir.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/FileSystem/DirIO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/FileSystem/File.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
4 changes: 2 additions & 2 deletions core/src/Streamly/Internal/FileSystem/Handle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 #-}
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/FileSystem/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions core/src/Streamly/Internal/FileSystem/Path/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions core/src/Streamly/Internal/FileSystem/PosixPath.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
--
Expand Down Expand Up @@ -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 #-}
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/FileSystem/WindowsPath.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ::
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Syscall/Posix/File.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fcntl.h>
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Syscall/Posix/ReadDir.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Syscall/Windows/File.hsc
Original file line number Diff line number Diff line change
@@ -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
(
Expand Down
2 changes: 1 addition & 1 deletion core/src/Streamly/Internal/Syscall/Windows/ReadDir.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/streamly-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Streamly/Internal/Network/Socket.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
2 changes: 1 addition & 1 deletion streamly.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading