I am trying to read CSV file which I succeded with some examples. Here is what I've got
*Main System.IO> let result=parseCSV contents
*Main System.IO> result
Right [["Name","Value","Amount"],["Rob","1","10"],["Bob","1.42","15.3"],["Tom","452.2","23.1"]]
But If I try to read value from this array I get an error
*Main System.IO> head result
<interactive>:21:6:
Couldn't match expected type `[a0]'
with actual type `Either ParseError [[String]]'
In the first argument of `head', namely `result'
In the expression: head result
In an equation for `it': it = head result
So how can I get Rid of the Right and actually use the list ?
*Main System.IO> :t result
result :: Either ParseError [[String]]