title: Couldn't match type `[]' with `IO' -- Haskell
body: <p>I'm beginner in Haskell. In this task i'm performing the split operation but i'm facing problem because of type mis match. I'm reading data from text file and the data is in table format. Ex. <code>1|2|Rahul|13.25.</code> In this format. Here <code>|</code> is delimiter so i want to split the data from the delimiter <code>|</code> and want to print 2nd column and 4th column data but i'm getting the error like this </p>
  
  <pre><code>  "Couldn't match type `[]' with `IO'
      Expected type: IO [Char]
        Actual type: [[Char]]
      In the return type of a call of `splitOn'"
  </code></pre>
  
  <p>Here is my code..</p>
  
  <pre><code>module Main where
  
  import Data.List.Split
  
  main = do
      list &lt;- readFile("src/table.txt")
      putStrLn list
      splitOn "|" list
  </code></pre>
  
  <p>Any help regarding this will appreciate.. Thanks</p>