Imp: types

from blog Scattered Thoughts, | ↗ original
This is a part of a series - start at the beginning. Before looking at the interpreter, I'm going to introduce a very simple type system. The type system has two jobs. It rules out sets that contain tuples of varied lengths. The denotational semantics allow sets like (1 x 2) | 3, but it's confusing in practice and banning it allows us to make...