aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-10-11 21:55:39 +0200
committerEmilio Jesus Gallego Arias2018-10-11 21:55:39 +0200
commitb6392038bb9e0a93b789632db351b4e8c0f116cf (patch)
treef55d750130b9c8ee9b23deafd2cbf55ce097bbc1 /interp
parent798ec1e76e21582735632927271818153169ced7 (diff)
parent74f8e4b04f59c79fc2320b63f7d8c0cb4de69e2b (diff)
Merge PR #8680: Check that lambda/prod ast's have proper binders during interning/printing
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index d02f59414e..d7497d4e8e 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -1863,12 +1863,11 @@ let internalize globalenv env pattern_mode (_, ntnvars as lvar) c =
Array.map (fun (bl,_,_) -> bl) idl,
Array.map (fun (_,ty,_) -> ty) idl,
Array.map (fun (_,_,bd) -> bd) idl)
+ | CProdN ([],c2) -> anomaly (Pp.str "The AST is malformed, found prod without binders.")
| CProdN (bl,c2) ->
let (env',bl) = List.fold_left intern_local_binder (env,[]) bl in
expand_binders ?loc mkGProd bl (intern_type env' c2)
- | CLambdaN ([],c2) ->
- (* Such a term is built sometimes: it should not change scope *)
- intern env c2
+ | CLambdaN ([],c2) -> anomaly (Pp.str "The AST is malformed, found lambda without binders.")
| CLambdaN (bl,c2) ->
let (env',bl) = List.fold_left intern_local_binder (reset_tmp_scope env,[]) bl in
expand_binders ?loc mkGLambda bl (intern env' c2)