Permalink
Browse files

Document field values in defaultDecodeOptions and spaceDecodeOptions

  • Loading branch information...
1 parent 1ca1784 commit b0090850ab86a143bdfee20fff0b009f35b6c4bb @Shimuuar committed Mar 8, 2013
Showing with 16 additions and 6 deletions.
  1. +16 −6 Data/Csv/Parser.hs
View
@@ -69,20 +69,30 @@ data DecodeOptions = DecodeOptions
, decTrimRecordSpace :: !Bool
}
--- TODO: Document default values in defaultDecodeOptions
-
--- | Decoding options for parsing CSV files.
+-- | Decoding options for parsing CSV files. Fields' values are set to:
+--
+-- [@'decDelimiter'@] comma
+--
+-- [@'decMergeDelimiters'@] false
+--
+-- [@'decTrimRecordSpace'@] false
defaultDecodeOptions :: DecodeOptions
defaultDecodeOptions = DecodeOptions
- { decDelimiter = (==44) -- comma
+ { decDelimiter = (==44) -- comma
, decMergeDelimiters = False
, decTrimRecordSpace = False
}
--- | Decoding options for parsing space-delimited files.
+-- | Decoding options for parsing space-delimited files. Fields' values are set to:
+--
+-- [@'decDelimiter'@] space or tab character.
+--
+-- [@'decMergeDelimiters'@] true
+--
+-- [@'decTrimRecordSpace'@] true
spaceDecodeOptions :: DecodeOptions
spaceDecodeOptions = DecodeOptions
- { decDelimiter = \c -> c == space || c == tab
+ { decDelimiter = \c -> c == space || c == tab
, decMergeDelimiters = True
, decTrimRecordSpace = True
}

0 comments on commit b009085

Please sign in to comment.