Currently, the typing of the `update' function doesn't use globally available information. I wonder if it's possible to run a whole program type analysis and then pass this to the linear evaluator. The basic problem here seems to be the construction of an "annotated" representation, i.e. add an extra param to the primivies which is the i/o types. -> lift a semantics to an annotated semantics.