summaryrefslogtreecommitdiff
path: root/compiler/PureUtils.ml
diff options
context:
space:
mode:
authorSon Ho2022-11-06 13:17:09 +0100
committerSon HO2022-11-07 10:36:13 +0100
commit55a4a7c8ef7bf9b393b593c8d4591aad7895cf06 (patch)
treec2737530e63a80632dacb18bc59de42b3232b738 /compiler/PureUtils.ml
parentef4ac7cb389e2b135b1a81f448aa90ee7d7d8430 (diff)
Replace all the occurrences of `failwith ...` with `raise (Failure ...)`
Diffstat (limited to '')
-rw-r--r--compiler/PureUtils.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index 30a89fee..2ef97e59 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -409,7 +409,7 @@ let mk_result_ty (ty : ty) : ty = Adt (Assumed Result, [ ty ])
let unwrap_result_ty (ty : ty) : ty =
match ty with
| Adt (Assumed Result, [ ty ]) -> ty
- | _ -> failwith "not a result type"
+ | _ -> raise (Failure "not a result type")
let mk_result_fail_texpression (ty : ty) : texpression =
let type_args = [ ty ] in