diff options
| author | herbelin | 2001-09-06 16:26:36 +0000 |
|---|---|---|
| committer | herbelin | 2001-09-06 16:26:36 +0000 |
| commit | 18e28049e62ce80a45c8f7bd6f496b502caa8ad1 (patch) | |
| tree | 75d062fe9373a6ec6bda28c79a2c68613ea832b5 | |
| parent | 598f1cde0073d33e290cb864e2c6fe71ac690c0f (diff) | |
Rétablissement de Print Section
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1926 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | library/lib.ml | 2 | ||||
| -rw-r--r-- | parsing/prettyp.ml | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/library/lib.ml b/library/lib.ml index 9f3ec4f5d6..5995a9600d 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -121,6 +121,8 @@ let open_section id = if Nametab.exists_section dir then errorlabstrm "open_section" [< pr_id id; 'sTR " already exists" >]; add_entry sp (OpenedSection (id, freeze_summaries())); + (*Pushed for the lifetime of the section: removed by unfrozing the summary*) + Nametab.push_section dir; path_prefix := dir; sp diff --git a/parsing/prettyp.ml b/parsing/prettyp.ml index cbb0ba6640..93751cf5dd 100644 --- a/parsing/prettyp.ml +++ b/parsing/prettyp.ml @@ -375,6 +375,7 @@ let list_filter_vec f vec = in frec (Array.length vec -1) [] +(* This is designed to print the contents of an opened section *) let read_sec_context qid = let dir = try Nametab.locate_section qid @@ -383,6 +384,8 @@ let read_sec_context qid = | ((sp,Lib.OpenedSection (_,_)) as hd)::rest -> let dir' = make_dirpath (wd_of_sp sp) in if dir = dir' then (hd::in_cxt) else get_cxt (hd::in_cxt) rest + | ((sp,Lib.ClosedSection (_,_,ctxt)) as hd)::rest -> + error "Cannot print the contents of a closed section" | [] -> [] | hd::rest -> get_cxt (hd::in_cxt) rest in |
