Compare commits

...

2 Commits

Author SHA1 Message Date
22b6942900 changed types of encodeCSV and encodeRawCSV
...to be more generic, the type now allows the to take any kind of input
2022-04-24 22:14:30 -04:00
c1e9fb7b8e typo 2022-04-24 22:13:07 -04:00

View File

@@ -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