Compare commits
2 Commits
master
...
22b6942900
| Author | SHA1 | Date | |
|---|---|---|---|
| 22b6942900 | |||
| c1e9fb7b8e |
@@ -153,7 +153,7 @@ encodeCSV
|
||||
:: Monad m
|
||||
=> [[T.Text]]
|
||||
-- ^ the data being encoded, organized into rows and fields
|
||||
-> ConduitT () BS.ByteString m ()
|
||||
-> ConduitT o BS.ByteString m ()
|
||||
encodeCSV csv = sourceList csv .| encodeRows
|
||||
|
||||
-- | encode an entire CSV file
|
||||
@@ -161,7 +161,7 @@ encodeRawCSV
|
||||
:: Monad m
|
||||
=> [[BS.ByteString]]
|
||||
-- ^ the data being encoded, organized into rows and fields
|
||||
-> ConduitT () BS.ByteString m ()
|
||||
-> ConduitT o BS.ByteString m ()
|
||||
encodeRawCSV csv = sourceList csv .| encodeRawRows
|
||||
|
||||
-- | Writes a stream of Text-based rows to a CSV file
|
||||
@@ -217,7 +217,7 @@ decodeUTF8 bs = case decodeUtf8' bs of
|
||||
Left _ -> Nothing
|
||||
Right txt -> Just txt
|
||||
|
||||
-- | convert a stream to ByteStrings to a string of bytes
|
||||
-- | convert a stream to ByteStrings to a stream of bytes
|
||||
toBytes :: Monad m => ConduitT BS.ByteString Word8 m ()
|
||||
toBytes = await >>= \case
|
||||
Just bs -> do
|
||||
|
||||
Reference in New Issue
Block a user