Permalink
Browse files

Updated examples.

  • Loading branch information...
1 parent 8817ebc commit d35f529a655e325489108ace81c5bd3c6928edd2 @sjoerdvisscher sjoerdvisscher committed Aug 26, 2012
Showing with 4 additions and 10 deletions.
  1. +2 −5 examples/IndexBasedGeneric.hs
  2. +2 −5 examples/NamedBasedGeneric.hs
@@ -2,16 +2,13 @@
import qualified Data.ByteString.Lazy as BL
import Data.Csv
-import qualified Data.Csv.Conversion.Generics as G
import qualified Data.Vector as V
import GHC.Generics
data Person = Person String Int deriving Generic
-instance FromRecord Person where
- parseRecord = G.parseRecord
-instance ToRecord Person where
- toRecord = G.toRecord
+instance FromRecord Person
+instance ToRecord Person
persons :: [Person]
persons = [Person "John" 50000, Person "Jane" 60000]
@@ -2,7 +2,6 @@
import qualified Data.ByteString.Lazy as BL
import Data.Csv
-import qualified Data.Csv.Conversion.Generics as G
import qualified Data.Vector as V
import GHC.Generics
@@ -12,10 +11,8 @@ data Person = Person
}
deriving Generic
-instance FromNamedRecord Person where
- parseNamedRecord = G.parseNamedRecord
-instance ToNamedRecord Person where
- toNamedRecord = G.toNamedRecord
+instance FromNamedRecord Person
+instance ToNamedRecord Person
persons :: [Person]
persons = [Person "John" 50000, Person "Jane" 60000]

0 comments on commit d35f529

Please sign in to comment.