Sun Mar 14 10:26:07 CET 2010
3 architectual elements:
- logic gates: Logic typeclass, parameterized over bit
- memory/register Mem monad, parameterized over bit
- opcodes written as Mem a -> Mem a'
The move from a -> a' can represent the mutation. Mutation can be
encoded in the type. I.e. it should be possible to maintain the whole
memory history, but at the same time use a fast imperative
So, how to encode mutation in the type? Essentially this needs a list
(environment) in the type. Lists can be encoded as tuples.
This is related to automatically "forwarding" monad transformers.
Let's try first to understand the future stage environment
representation in . It seems to be useful for this problem, as we
can get rid of the assignment by using nested-let (see the Scheme
The paper refers to : environment classifiers. It seems  is
a bit too general; I don't need effects. However,  does use a
multi-stage calculus. I'm confused... Let's stick to .
It doesn't seem that the approach in  is very useful, except for
the environment passing idea.