diff options
| author | coq | 2002-10-05 11:03:20 +0000 |
|---|---|---|
| committer | coq | 2002-10-05 11:03:20 +0000 |
| commit | 1e485645ef6481a856e8a67477f186519fb8ec9d (patch) | |
| tree | fe06414569b65ae325c474f55e831fe228a0c23c /contrib | |
| parent | dfb48b895bb114e6eb49840d960268e18f8aaf0c (diff) | |
Lazy experimentale temporaire...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3091 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/extraction/extraction.ml | 12 | ||||
| -rw-r--r-- | contrib/xml/xmlcommand.ml4 | 8 |
2 files changed, 13 insertions, 7 deletions
diff --git a/contrib/extraction/extraction.ml b/contrib/extraction/extraction.ml index f574cecae3..e1848589d6 100644 --- a/contrib/extraction/extraction.ml +++ b/contrib/extraction/extraction.ml @@ -665,20 +665,22 @@ let extract_constant kn r = DdummyType r | (Logic,_) -> axiom_warning_message kn; Dterm (r, MLdummy')) - | Some body -> + | Some l_body -> (match flag_of_type env typ with | (Logic, Arity) -> DdummyType r | (Info, Arity) -> let s,vl = type_sign_vl env typ in let db = db_from_sign s in + let body = Lazy.force_val l_body in let t = extract_type_arity env db body (List.length s) in Dtype (r, vl, t) | (Logic, _) -> Dterm (r, MLdummy') | (Info, _) -> - let a = extract_term env body in - if a <> MLdummy' then - Dterm (r, kill_prop_lams_eta a (signature_of_kn kn)) - else Dterm (r, a)) + let body = Lazy.force_val l_body in + let a = extract_term env body in + if a <> MLdummy' then + Dterm (r, kill_prop_lams_eta a (signature_of_kn kn)) + else Dterm (r, a)) let extract_constant_cache kn r = try lookup_constant kn diff --git a/contrib/xml/xmlcommand.ml4 b/contrib/xml/xmlcommand.ml4 index 14d0f94ac0..8710a9e1fa 100644 --- a/contrib/xml/xmlcommand.ml4 +++ b/contrib/xml/xmlcommand.ml4 @@ -739,7 +739,9 @@ let print (_,qid as locqid) fn = begin match val0 with None -> print_axiom id typ [] hyps env inner_types - | Some c -> print_definition id c typ [] hyps env inner_types + | Some lc -> + let c = Lazy.force_val lc in + print_definition id c typ [] hyps env inner_types end | Ln.IndRef (kn,_) -> let sp = Nt.sp_of_global None (Ln.IndRef(kn,0)) in @@ -856,7 +858,9 @@ let print_object lobj id (sp,kn) dn fv env = begin match val0 with None -> print_axiom id typ fv hyps env inner_types - | Some c -> print_definition id c typ fv hyps env inner_types + | Some lc -> + let c = Lazy.force_val lc in + print_definition id c typ fv hyps env inner_types end | "INDUCTIVE" -> let |
