Thanks everyone!<br>Now I think using IORef is the most practical way to do this.<br>And Claude, I will look into the article that you mentioned.<br><br>jinwoo<br><br><br><div class="gmail_quote">On Fri, Apr 4, 2008 at 3:08 AM, Peter Hercek &lt;<a href="mailto:phercek@gmail.com">phercek@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Jinwoo Lee wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Is there any way in which I can do without IORef in tabHandler and commandLoop (written in red and bold, if you can see)?<br>
</blockquote>
<br></div>
You could just always redefine the key binding for \t with<br>
&nbsp;a new closure which contains the updated &quot;pwd&quot; value (or<br>
&nbsp;the whole state if you like it more that way). I suppose<br>
&nbsp;readline supports key binding redefinition (???).<br>
But I do not think I like it more that IORef, I rather<br>
&nbsp;use IORefs with imperative interfaces &nbsp;:-)<br>
<br>
Peter.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jinwoo Lee<br>Always remember that you are unique. Just like everyone else.