title: Parsing from openFile contents
body: <p>This seems so simple, but for some reason I'm confusing myself. The "thing" line is giving me the error.<br>
  The parsing functions are correct (stolen from RWH). I just have a type error.</p>
  
  <p>Thanks!</p>
  
  <pre><code>import Text.ParserCombinators.Parsec
  import System.IO
  
  main = do 
     csv_cont &lt;- openFile "aCSV.txt" ReadMode
     csv_cont1 &lt;- hGetContents csv_cont
     thing &lt;- parseCSV csv_cont1
     return () 
  
  
  csvFile = endBy line eol
  line = sepBy cell (char ',')
  cell = many (noneOf ",\n")
  eol = char '\n'
  
  parseCSV :: String -&gt; Either ParseError [[String]]
  parseCSV input = parse csvFile "(unknown)" input
  </code></pre>