diff options
author | Stephane Glondu <steph@glondu.net> | 2010-12-24 11:53:29 +0100 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2010-12-24 11:53:29 +0100 |
commit | 6b691bbd2101fd39395c0d2135fd7c06a8915e14 (patch) | |
tree | b04b45d1a6f42d19b1428c522d647afbad2f9b83 /plugins/extraction/scheme.ml | |
parent | 3e96002677226c0cdaa8f355938a76cfb37a722a (diff) |
Imported Upstream version 8.3pl1upstream/8.3pl1
Diffstat (limited to 'plugins/extraction/scheme.ml')
-rw-r--r-- | plugins/extraction/scheme.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/extraction/scheme.ml b/plugins/extraction/scheme.ml index fa293ba1..06098591 100644 --- a/plugins/extraction/scheme.ml +++ b/plugins/extraction/scheme.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: scheme.ml 13323 2010-07-24 15:57:30Z herbelin $ i*) +(*i $Id: scheme.ml 13733 2010-12-21 13:08:53Z letouzey $ i*) (*s Production of Scheme syntax. *) @@ -87,7 +87,7 @@ let rec pp_expr env args = ++ spc () ++ hov 0 (pp_expr env' [] a2))))) | MLglob r -> apply (pp_global Term r) - | MLcons (i,r,args') -> + | MLcons (info,r,args') -> assert (args=[]); let st = str "`" ++ @@ -95,7 +95,7 @@ let rec pp_expr env args = (if args' = [] then mt () else spc ()) ++ prlist_with_sep spc (pp_cons_args env) args') in - if i = Coinductive then paren (str "delay " ++ st) else st + if info.c_kind = Coinductive then paren (str "delay " ++ st) else st | MLcase (_,t,pv) when is_custom_match pv -> let mkfun (_,ids,e) = if ids <> [] then named_lams (List.rev ids) e @@ -104,9 +104,9 @@ let rec pp_expr env args = hov 2 (str (find_custom_match pv) ++ fnl () ++ prvect (fun tr -> pp_expr env [] (mkfun tr) ++ fnl ()) pv ++ pp_expr env [] t) - | MLcase ((i,_),t, pv) -> + | MLcase (info,t, pv) -> let e = - if i <> Coinductive then pp_expr env [] t + if info.m_kind <> Coinductive then pp_expr env [] t else paren (str "force" ++ spc () ++ pp_expr env [] t) in apply (v 3 (paren (str "match " ++ e ++ fnl () ++ pp_pat env pv))) @@ -123,7 +123,7 @@ let rec pp_expr env args = | MLaxiom -> paren (str "error \"AXIOM TO BE REALIZED\"") and pp_cons_args env = function - | MLcons (i,r,args) when i<>Coinductive -> + | MLcons (info,r,args) when info.c_kind<>Coinductive -> paren (pp_global Cons r ++ (if args = [] then mt () else spc ()) ++ prlist_with_sep spc (pp_cons_args env) args) |