aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/term.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-11-25 00:46:41 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-12-14 15:57:51 +0100
commite0c06c7dac30b9959a3eb90b0c1d324f061a8660 (patch)
treeda410e140ebbc10fafd57c3b477501db14f12e6c /kernel/term.ml
parent2c2a08083bc535397359299690d0bfb3523a9ee1 (diff)
Fixes incorrect anomaly message in lambda/prod_applist_assum + typo in doc.
Was introduced in e8c47b65.
Diffstat (limited to 'kernel/term.ml')
-rw-r--r--kernel/term.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/term.ml b/kernel/term.ml
index aa8805952..ad1999f1c 100644
--- a/kernel/term.ml
+++ b/kernel/term.ml
@@ -352,10 +352,11 @@ let lambda_applist_assum n c l =
let rec app n subst t l =
if Int.equal n 0 then
if l == [] then substl subst t
- else anomaly (Pp.str "Not enough arguments.")
+ else anomaly (Pp.str "Too many arguments.")
else match kind_of_term t, l with
| Lambda(_,_,c), arg::l -> app (n-1) (arg::subst) c l
| LetIn(_,b,_,c), _ -> app (n-1) (substl subst b::subst) c l
+ | _, [] -> anomaly (Pp.str "Not enough arguments.")
| _ -> anomaly (Pp.str "Not enough lambda/let's.") in
app n [] c l
@@ -377,10 +378,11 @@ let prod_applist_assum n c l =
let rec app n subst t l =
if Int.equal n 0 then
if l == [] then substl subst t
- else anomaly (Pp.str "Not enough arguments.")
+ else anomaly (Pp.str "Too many arguments.")
else match kind_of_term t, l with
| Prod(_,_,c), arg::l -> app (n-1) (arg::subst) c l
| LetIn(_,b,_,c), _ -> app (n-1) (substl subst b::subst) c l
+ | _, [] -> anomaly (Pp.str "Not enough arguments.")
| _ -> anomaly (Pp.str "Not enough prod/let's.") in
app n [] c l