784 |
val Env.PrimFun ovldList = Env.findFunc (#env env, rator) |
val Env.PrimFun ovldList = Env.findFunc (#env env, rator) |
785 |
val (rhs, _) = resolveOverload (cxt, rator, [ty1, ty2], [e1', e2'], ovldList) |
val (rhs, _) = resolveOverload (cxt, rator, [ty1, ty2], [e1', e2'], ovldList) |
786 |
in |
in |
787 |
|
(* check that x' is mutable *) |
788 |
|
case Var.kindOf x' |
789 |
|
of Var.StrandStateVar => () |
790 |
|
| Var.StrandOutputVar => () |
791 |
|
| Var.LocalVar => () |
792 |
|
| _ => err(cxt, [ |
793 |
|
S "assignment to immutable variable ", A x |
794 |
|
]) |
795 |
|
(* end case *); |
796 |
(AST.S_Assign(x', rhs), env) |
(AST.S_Assign(x', rhs), env) |
797 |
end |
end |
798 |
| NONE => err(cxt, [S "undeclared variable ", A x, S " on lhs of ", A rator]) |
| NONE => err(cxt, [S "undeclared variable ", A x, S " on lhs of ", A rator]) |