Many people who were computer enthusiasts in the 80's have heard of the Infocom series of interactive fiction games, notably ones such as 'Zork', 'The Hitchhiker's Guide to the Galaxy', 'Planetfall', 'A Mind Forever Voyaging', etc.
These games were implemented on top of the "Z-Machine" virtual machine. The machine is implemented as a block of RAM, a stack and a virtual processor. The process executes instructions which can dynamically read and write to the RAM.
My question is this: the VMs RAM is dynamic. What is an efficient and reasonably idiomatic way to represent this RAM (and more holistically the structure of the virtual machine) so that I can implement software to run these games? For example, should I use Data.Array to represent the RAM and the state monad?