I did a writeup for an even simpler example, which hopefully will give you the right idea how to do it in your case: http://blog.ezyang.com/2011/12/accessing-lazy-structures-from/ Cheers, Edward