Hi All,<br><br>I am a newbie to Haskell, and have been using Programming in Haskell along with Eric Meijer videos covering the book syllabus. I am currently on Chapter 8 Functional Parsers, and trying to implement few of the examples given in the book. <br>


<br>Following is the example :<br><br>item = \inp -&gt; case inp of<br>        [] -&gt; []<br>        (x:xs) -&gt; [(x,xs)]<br><br>p = do  x &lt;- item<br>        y &lt;- item<br>        z &lt;- item<br>        return (x,y,z)<br>


<br>=========<br><br>When I compile it using GHCI, I get the following error :<br><br>[1 of 1] Compiling Main             ( parser.hs, interpreted )<br><br>parser.hs:5:8:<br>    No instance for (Monad ((-&gt;) [t]))<br>      arising from a do statement at parser.hs:5:8-16<br>


    Possible fix: add an instance declaration for (Monad ((-&gt;) [t]))<br>    In a stmt of a &#39;do&#39; expression: x &lt;- item<br>    In the expression:<br>        do x &lt;- item<br>           y &lt;- item<br>           z &lt;- item<br>


           return (x, y, z)<br>    In the definition of `p&#39;:<br>        p = do x &lt;- item<br>               y &lt;- item<br>               z &lt;- item<br>               ....<br>Failed, modules loaded: none.<br><br>


=========<br><br>I tried googling for samples, above error message etc. But not getting to solution. Can anyone guide me as to what am I doing wrong and how can I fix this.<br><br clear="all">Regards,<br>Amiruddin Nagri,<br>

India<br><br>GTalk : <a href="mailto:amir.nagri@gmail.com" target="_blank">amir.nagri@gmail.com</a><br>
<br>