Worked a lot on type inference and type checking, but there are
quite a few bugs to fix in it...