OK. I understand it now.
I think the article Claude suggested is worth a read because it shows how to hide using IORef in simple APIs.

Thanks,
jinwoo


On Fri, Apr 4, 2008 at 10:17 AM, Brandon S. Allbery KF8NH <allbery@ece.cmu.edu> wrote:

On Apr 3, 2008, at 21:07 , Jinwoo Lee wrote:
But I still have to use IORef this way.

You can't escape the IORef unless you can convince the library to thread your state everywhere that it needs to be modified *and* where it needs to be read, without copying it.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH





--
Jinwoo Lee
Always remember that you are unique. Just like everyone else.