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
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.
On Apr 3, 2008, at 21:07 , Jinwoo Lee wrote:
But I still have to use IORef this way.
--
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