summaryrefslogtreecommitdiff
path: root/compiler/PureUtils.ml
diff options
context:
space:
mode:
authorSon Ho2023-12-21 15:25:06 +0100
committerSon Ho2023-12-21 15:25:06 +0100
commitd9f91cfcd538525f024c6019d7c8250dda8d76fd (patch)
tree511db3d6ab5036f0de1b665ff22923d9a068f41a /compiler/PureUtils.ml
parent435fe4cf63869448e2b25486b564ede9efa9a34b (diff)
Remove some asserts which are now useless
Diffstat (limited to '')
-rw-r--r--compiler/PureUtils.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index 6579e84c..d4aaba16 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -332,7 +332,10 @@ let mk_app (app : texpression) (arg : texpression) : texpression =
match app.ty with
| TArrow (ty0, ty1) ->
(* Sanity check *)
- if ty0 <> arg.ty then raise_or_return "App: wrong input type"
+ if
+ (* TODO: we need to normalize the types *)
+ !Config.type_check_pure_code && ty0 <> arg.ty
+ then raise_or_return "App: wrong input type"
else
let e = App (app, arg) in
let ty = ty1 in