aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/heads.ml
diff options
context:
space:
mode:
Diffstat (limited to 'library/heads.ml')
-rw-r--r--library/heads.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/heads.ml b/library/heads.ml
index 8fda452c1..813031558 100644
--- a/library/heads.ml
+++ b/library/heads.ml
@@ -80,7 +80,9 @@ let kind_of_head env t =
match pi2 (lookup_named id env) with
| Some c -> aux k l c b
| None -> NotImmediatelyComputableHead)
- | Const cst -> on_subterm k l b (constant_head cst)
+ | Const cst ->
+ (try on_subterm k l b (constant_head cst)
+ with Not_found -> assert false)
| Construct _ | CoFix _ ->
if b then NotImmediatelyComputableHead else ConstructorHead
| Sort _ | Ind _ | Prod _ -> RigidHead RigidType