Haskell I/O: Filtering empty lists in CSV data-set
<p>Once again I'm stuck with haskell. This time I'm supposed to filter a CSV-dataset, using IO which I'm struggling to understand. Any additional related information is appreciated. </p>

<p>The structure is predetermined, and to me it seems messy. Is this really how one should do it? (I still have to do it this way, so this is a little "on the side"-question). </p>

<pre><code>getRawData' :: String -&gt; IO [[String]]
getRawData' fn = do
    s &lt;- readFile fn 
    return $ parseCSVsimple s 



getRawData :: String -&gt; IO [[String]]
getRawData fn = do
    d &lt;- getRawData' fn
    return (dropEmpty d)



dropEmpty [[String]] -&gt; [[String]] 
</code></pre>

<p><strong>DropEmpty - This is where I need help</strong> For a "normal" list I would just filter it straightforward, but this IO and different functions calling each other has me confused. </p>

<p>Sorry for stupid questions, I've programmed for 8 months and had to use 6-7 languages since then. Any general information related to the question is very much appreciated as well. </p>

<p>EDIT; FOLLOW-UP: </p>

<p>Thanks to good answers I have improved my understanding and implemented the following code: </p>

<pre><code>dropEmpty :: [[String]] -&gt; [[String]]
dropEmpty = filter(not . null) 
</code></pre>

<p>However, I still see empty lists in the list. Is this because I am checking if the whole list of lists is empty? How do I sepcify that I want to check the "internal" lists? </p>