diff options
author | Son Ho | 2022-11-06 13:17:09 +0100 |
---|---|---|
committer | Son HO | 2022-11-07 10:36:13 +0100 |
commit | 55a4a7c8ef7bf9b393b593c8d4591aad7895cf06 (patch) | |
tree | c2737530e63a80632dacb18bc59de42b3232b738 /compiler/PureUtils.ml | |
parent | ef4ac7cb389e2b135b1a81f448aa90ee7d7d8430 (diff) |
Replace all the occurrences of `failwith ...` with `raise (Failure ...)`
Diffstat (limited to '')
-rw-r--r-- | compiler/PureUtils.ml | 2 |
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 |