First type environment implementation

We can now compile the replace.c example; the problem was that it used
type variables.