diff options
Diffstat (limited to 'src/ocaml_backend.ml')
| -rw-r--r-- | src/ocaml_backend.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ocaml_backend.ml b/src/ocaml_backend.ml index 60a34273..1feb6513 100644 --- a/src/ocaml_backend.ml +++ b/src/ocaml_backend.ml @@ -177,9 +177,9 @@ let rec ocaml_pat ctx (P_aux (pat_aux, _) as pat) = | P_id id -> begin match Env.lookup_id id (pat_env_of pat) with - | Local (Immutable, _) | Unbound -> zencode ctx id + | Local (_, _) | Unbound -> zencode ctx id | Enum _ -> zencode_upper ctx id - | _ -> failwith ("Ocaml: Cannot pattern match on mutable variable or register:" ^ string_of_pat pat) + | _ -> failwith ("Ocaml: Cannot pattern match on register: " ^ string_of_pat pat) end | P_lit lit -> ocaml_lit lit | P_typ (_, pat) -> ocaml_pat ctx pat @@ -248,8 +248,8 @@ let rec ocaml_exp ctx (E_aux (exp_aux, _) as exp) = (ocaml_atomic_exp ctx body ^^ semi) ^/^ separate space [string "if"; ocaml_atomic_exp ctx cond; - string "then loop ()"; - string "else ()"] + string "then ()"; + string "else loop ()"] in (string "let rec loop () =" ^//^ loop_body) ^/^ string "in" |
