diff options
author | 2009-06-03 17:54:27 +0000 | |
---|---|---|
committer | 2009-06-03 17:54:27 +0000 | |
commit | 70661f61a23954db18ff4836778945ae235157b2 (patch) | |
tree | c384c557b552a0ee346ec565c330780077298ca3 | |
parent | 006d5665a34d515a37984fd35b0992b9a5603b36 (diff) |
Ensure the precondition of the partial function [list_chop] holds
before calling it.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12162 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | parsing/prettyp.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parsing/prettyp.ml b/parsing/prettyp.ml index d24f2dd6f..f00e5f0a1 100644 --- a/parsing/prettyp.ml +++ b/parsing/prettyp.ml @@ -107,8 +107,9 @@ let need_expansion impl ref = let typ = Global.type_of_global ref in let ctx = (prod_assum typ) in let nprods = List.length (List.filter (fun (_,b,_) -> b=None) ctx) in - impl <> [] & let _,lastimpl = list_chop nprods impl in - List.filter is_status_implicit lastimpl <> [] + impl <> [] & List.length impl >= nprods & + let _,lastimpl = list_chop nprods impl in + List.filter is_status_implicit lastimpl <> [] type opacity = | FullyOpaque |