Try to provide better error reporting of type mismatches in bootstrap

Change-Id: I0f272a4a31f504aefebbf064037ecc18b0ca8127
Added environment building to compiler

Change-Id: I1d5e27615f532a819b39a3233fa8772d00b90adb
Add documentation for compiler design

Change-Id: Id7b03e22475bd59a5d9b4fbb692b7daa08774e52