I am quite certain I am not the first to try to do this, but my google-fu is failing me today.
How does one go about interpreting a language with mutable objects in Haskell?
The
best approach I can think of is to represent the language's memory as a
`Data.Map.Map RefID LanguageObject` where RefID is some type (probably
Int) used as a reference. The LanguageObject structure might contain
some values of type RefID to refer to other objects. Mutating an object
involves simply replacing the value in the map at a given RefID.