summaryrefslogtreecommitdiff
path: root/src/ocaml_backend.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/ocaml_backend.ml')
-rw-r--r--src/ocaml_backend.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ocaml_backend.ml b/src/ocaml_backend.ml
index 2a6206d4..970dea83 100644
--- a/src/ocaml_backend.ml
+++ b/src/ocaml_backend.ml
@@ -195,7 +195,8 @@ let rec ocaml_pat ctx (P_aux (pat_aux, _) as pat) =
match Env.lookup_id id (pat_env_of pat) with
| Local (Immutable, _) | Unbound -> zencode ctx id
| Enum _ -> zencode_upper ctx id
- | _ -> failwith "Ocaml: Cannot pattern match on mutable variable or register"
+ | Union _ -> zencode_upper ctx id
+ | _ -> failwith ("Ocaml: Cannot pattern match on mutable variable or register:" ^ string_of_pat pat)
end
| P_lit lit -> ocaml_lit lit
| P_typ (_, pat) -> ocaml_pat ctx pat