Converts typechecker errors to CompileErrors