[Haskell-beginners] Anyone suggest .csv file parser?
Jeon-Young Kang
jykang22 at gmail.com
Sun Nov 29 02:42:58 UTC 2015
Hi all.
I am working on import *.csv file into haskell.
As you guys recommended, I built code for comparison human's age as follows.
data Person = Person {name:: String, age:: Int } deriving(Show)
data Relations = Friend | Older | Younger
class Comparison a where
compare:: a -> a -> Relations
instance Comparison Person where
compare (Person a b) (Person a b)
| b1 == b2 = Friend
| b1 > b2 = Older
| b1 < b2 = Younger
Also, I have .csv file as follows.
name age
tom 19
jane 21
By using above code, I would like to apply the above code for .csv file.
What is the best for this purpose?
Sincerely,
JY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151128/185db727/attachment-0001.html>
More information about the Beginners
mailing list