<div dir="ltr">Yes, I agree there is no need in the GHC version to wrap it with return, you can imagine that &quot;operation&quot; instead asks the user through the command line which operation to do, (++) or just pick the first or the second string for instance. In that case it would really need the IO monad and that is my situation.<br>
<br>I didn&#39;t take the time to code it for the purpose of the example but that is my problem. In that case liftM2 offers me a solution, I can use it also to call functions operating in another monad than the one the parameters are in. In Fay I have that problem with Fay monad, and I don&#39;t know why. It&#39;s more a Fay question, but Fay normally uses GHC for typecheck so I thought it&#39;s maybe something with the Fay monad that is obvious for someone more knowledgeable than me.<br>
<br>emmanuel<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 7, 2013 at 9:38 AM, Daniel Trstenjak <span dir="ltr">&lt;<a href="mailto:daniel.trstenjak@gmail.com" target="_blank">daniel.trstenjak@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
&gt; I can&#39;t see how even your GHC version of &#39;operation&#39; should work ...<br>
<br>
Ok, the GHC version puts the IO action into the Maybe and returns it then<br>
from &#39;process&#39;. There&#39;s really no need for this extra wrapping of the string<br>
into the IO monad.<br>
<br>
I know nothing about Fay, so I don&#39;t know why this extra wrapping shouldn&#39;t<br>
work for Fay. Fay has an instance for Monad, right?<br>
<br>
<br>
Greetings,<br>
Daniel<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>