on master help sign in
Make an example doctest in Streamly.Internal.Network.Socket
db3f2deAdithya Kumar
src/Streamly/Internal/Network/Socket.hs+1−5
@@ -521,8 +521,6 @@ writeMaybesWith n h =
521 writeOnNothing = FL.takeEndBy_ isNothing writeNJusts
521 writeOnNothing = FL.takeEndBy_ isNothing writeNJusts
522 in FL.many writeOnNothing (writeChunks h)
522 in FL.many writeOnNothing (writeChunks h)
523
523
524−-- > write = 'writeWith' defaultChunkSize
525−--
526-- | Write a byte stream to a file handle. Combines the bytes in chunks of size
524-- | Write a byte stream to a file handle. Combines the bytes in chunks of size
527-- up to 'defaultChunkSize' before writing. Note that the write behavior
525-- up to 'defaultChunkSize' before writing. Note that the write behavior
528-- depends on the 'IOMode' and the current seek position of the handle.
526-- depends on the 'IOMode' and the current seek position of the handle.
@@ -534,9 +532,7 @@ putBytes = putBytesWith defaultChunkSize
534-- | Write a byte stream to a socket. Accumulates the input in chunks of
532-- | Write a byte stream to a socket. Accumulates the input in chunks of
535-- up to 'defaultChunkSize' bytes before writing.
533-- up to 'defaultChunkSize' bytes before writing.
536--
534--
537−-- @
538−-- write = 'writeWith' 'defaultChunkSize'
535+-- >>> write = Socket.writeWith defaultChunkSize
539−-- @
540--
536--
541{-# INLINE write #-}
537{-# INLINE write #-}
542write :: MonadIO m => Socket -> Fold m Word8 ()
538write :: MonadIO m => Socket -> Fold m Word8 ()