diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-11-22 18:09:38 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-11-22 18:09:38 +0000 |
commit | 2e43b03b0bb88bd3b4cb7695d5079c51ca41b0a7 (patch) | |
tree | 2153243e54e6c729462b700bc2118095f40c592a /library/heads.ml | |
parent | 62789dd765375bef0fb572603aa01039a82dd3b5 (diff) |
Monomorphization (library)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15993 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/heads.ml')
-rw-r--r-- | library/heads.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/library/heads.ml b/library/heads.ml index f3bcba770..0d3ed0fdb 100644 --- a/library/heads.ml +++ b/library/heads.ml @@ -87,8 +87,13 @@ let kind_of_head env t = if b then NotImmediatelyComputableHead else ConstructorHead | Sort _ | Ind _ | Prod _ -> RigidHead RigidType | Cast (c,_,_) -> aux k l c b - | Lambda (_,_,c) when l = [] -> assert (not b); aux (k+1) [] c b - | Lambda (_,_,c) -> aux (k+1) (List.tl l) (subst1 (List.hd l) c) b + | Lambda (_,_,c) -> + begin match l with + | [] -> + let () = assert (not b) in + aux (k + 1) [] c b + | h :: l -> aux (k + 1) l (subst1 h c) b + end | LetIn _ -> assert false | Meta _ | Evar _ -> NotImmediatelyComputableHead | App (c,al) -> aux k (Array.to_list al @ l) c b |