Fixed errors in semantic.ml; it now compiles.