From 113b703a695acbe31ac6dd6a8c4aa94f6fda7545 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Mon, 8 Sep 2008 00:15:04 +0200 Subject: Imported Upstream version 8.2~beta4.svn20080907+dfsg --- parsing/prettyp.ml | 4 ++-- parsing/printmod.ml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'parsing') diff --git a/parsing/prettyp.ml b/parsing/prettyp.ml index 3aa51c53..4811c443 100644 --- a/parsing/prettyp.ml +++ b/parsing/prettyp.ml @@ -10,7 +10,7 @@ * on May-June 2006 for implementation of abstraction of pretty-printing of objects. *) -(* $Id: prettyp.ml 11309 2008-08-06 10:30:35Z herbelin $ *) +(* $Id: prettyp.ml 11343 2008-09-01 20:55:13Z herbelin $ *) open Pp open Util @@ -744,7 +744,7 @@ let print_path_between cls clt = let j = index_of_class clt in let p = try - lookup_path_between (i,j) + lookup_path_between_class (i,j) with _ -> errorlabstrm "index_cl_of_id" (str"No path between " ++ pr_class cls ++ str" and " ++ pr_class clt diff --git a/parsing/printmod.ml b/parsing/printmod.ml index 0bdae7c7..be73f573 100644 --- a/parsing/printmod.ml +++ b/parsing/printmod.ml @@ -60,10 +60,10 @@ let rec print_module name locals with_body mb = in let modtype = match mb.mod_type with None -> str "" - | Some t -> str": " ++ + | Some t -> spc () ++ str": " ++ print_modtype locals t in - hv 2 (str "Module " ++ name ++ spc () ++ modtype ++ body) + hv 2 (str "Module " ++ name ++ modtype ++ body) and print_modtype locals mty = match mty with @@ -102,7 +102,7 @@ and print_sig locals msid sign = | SFBconst {const_opaque=true} -> str "Parameter " | SFBmind _ -> str "Inductive " | SFBmodule _ -> str "Module " - | SFBalias (mp,_) -> str "Module" + | SFBalias (mp,_) -> str "Module " | SFBmodtype _ -> str "Module Type ") ++ str (string_of_label l) in prlist_with_sep spc print_spec sign @@ -114,7 +114,7 @@ and print_struct locals msid struc = | SFBconst {const_body=None} -> str "Parameter " | SFBmind _ -> str "Inductive " | SFBmodule _ -> str "Module " - | SFBalias (mp,_) -> str "Module" + | SFBalias (mp,_) -> str "Module " | SFBmodtype _ -> str "Module Type ") ++ str (string_of_label l) in prlist_with_sep spc print_body struc @@ -125,9 +125,9 @@ and print_modexpr locals mexpr = match mexpr with (* let env' = Modops.add_module (MPbid mbid) (Modops.body_of_type mtb) env in *) let locals' = (mbid, get_new_id locals (id_of_mbid mbid))::locals in - hov 2 (str "Functor" ++ spc() ++ str"[" ++ pr_id(id_of_mbid mbid) ++ + hov 2 (str "Functor" ++ spc() ++ str"(" ++ pr_id(id_of_mbid mbid) ++ str ":" ++ print_modtype locals mty.typ_expr ++ - str "]" ++ spc () ++ print_modexpr locals' mexpr) + str ")" ++ spc () ++ print_modexpr locals' mexpr) | SEBstruct (msid, struc) -> hv 2 (str "Struct" ++ spc () ++ print_struct locals msid struc ++ brk (1,-2) ++ str "End") | SEBapply (mexpr,marg,_) -> -- cgit v1.2.3