Permalink
Browse files

Improve docs

  • Loading branch information...
1 parent ebd1bd4 commit 794b6712e3fd717e57002886bd8858e11a019f27 @tibbe tibbe committed Jan 5, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 Data/Csv.hs
  2. +1 −1 Data/Csv/Conversion.hs
View
6 Data/Csv.hs
@@ -144,10 +144,10 @@ import Data.Csv.Types
-- > Right v -> forM_ v $ \ (Hex val1, Hex val2) ->
-- > print (val1, val2)
--
--- In order to ignore column you can use unit type '()'. It always
--- successfully decode. Note that it lacks corresponding 'ToField'
+-- In order to ignore a column you can use unit type @()@. It always
+-- successfully decodes. Note that it lacks a corresponding 'ToField'
-- instance. It serves as placeholder to indicate that there's
--- something in the column you don't care what.
+-- something in the column you don't care about.
--
-- > case decode False "foo,1\r\nbar,22" of
-- > Left err -> putStrLn err
View
2 Data/Csv/Conversion.hs
@@ -386,7 +386,7 @@ instance ToField a => ToField (Maybe a) where
toField = maybe B.empty toField
{-# INLINE toField #-}
--- | Could used to ignore column during decoding.
+-- | Ignores the 'Field'. Always succeeds.
instance FromField () where
parseField _ = pure ()
{-# INLINE parseField #-}

0 comments on commit 794b671

Please sign in to comment.