From 35130eeae1be743bf508994ad912109148ac3916 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 21 Apr 2022 22:23:26 -0400 Subject: [PATCH] documentation for slurpCSV and slurpRawCSV --- src/Data/CSV/Sip.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Data/CSV/Sip.hs b/src/Data/CSV/Sip.hs index e9729e7..e5a362c 100644 --- a/src/Data/CSV/Sip.hs +++ b/src/Data/CSV/Sip.hs @@ -59,11 +59,19 @@ import Data.Text.Encoding (decodeUtf8') import Data.Word (Word8) -- | read an entire CSV file -slurpCSV :: MonadResource m => FilePath -> m [[T.Text]] +slurpCSV + :: MonadResource m + => FilePath + -- ^ the path to the file to read + -> m [[T.Text]] slurpCSV file = runConduit $ sourceFile file .| decodeRows .| consume -- | read an entire CSV file in raw mode -slurpRawCSV :: MonadResource m => FilePath -> m [[BS.ByteString]] +slurpRawCSV + :: MonadResource m + => FilePath + -- ^ the path to the file to read + -> m [[BS.ByteString]] slurpRawCSV file = runConduit $ sourceFile file .| decodeRawRows .| consume -- | read a CSV stream, using the first row as a header containing