X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcontent_pres%2FtermContentPres.ml;h=00f6c978982b5f7904f30a098c2eb699a401cd94;hb=11b2157bacf59cfc561c2ef6f92ee41ee2c1a006;hp=f1ea0b25e9abeb0b42a78842f7db2a58a721cc29;hpb=9b09890767aaa93e512324f8e7f13e2cdeebac88;p=helm.git diff --git a/helm/software/components/content_pres/termContentPres.ml b/helm/software/components/content_pres/termContentPres.ml index f1ea0b25e..00f6c9789 100644 --- a/helm/software/components/content_pres/termContentPres.ml +++ b/helm/software/components/content_pres/termContentPres.ml @@ -94,6 +94,12 @@ let string_of_sort_kind = function | `CProp _ -> "CProp" | `Type _ -> "Type" | `NType s -> "Type[" ^ s ^ "]" + | `NCProp s -> "CProp[" ^ s ^ "]" + +let map_space f l = + HExtlib.list_concat + ~sep:[space] (List.map (fun x -> [f x]) l) +;; let pp_ast0 t k = let rec aux = @@ -146,7 +152,7 @@ let pp_ast0 t k = function Ast.Pattern (head, href, vars) -> hvbox true true (ident_w_href href head :: - List.flatten (List.map (fun x -> [break;x]) (List.map aux_var vars))) + List.flatten (List.map (fun x -> [break;x]) (map_space aux_var vars))) | Ast.Wildcard -> builtin_symbol "_" in let patterns' = @@ -205,8 +211,8 @@ let pp_ast0 t k = match rec_kind with `Inductive -> "rec" | `CoInductive -> "corec" in let mk_fun (args, (name,ty), body, rec_param) = - List.map aux_var args ,k name, HExtlib.map_option k ty, k body, - fst (List.nth args rec_param) + List.flatten (List.map (fun x -> [aux_var x; space]) args), + k name, HExtlib.map_option k ty, k body, fst (List.nth args rec_param) in let mk_funs = List.map mk_fun in let fst_fun, tl_funs = @@ -219,9 +225,10 @@ let pp_ast0 t k = space; keyword rec_op; space; - name] @ + name; + space] @ params @ - [space; keyword "on" ; space ; rec_param ;space ] @ + [keyword "on" ; space ; rec_param ;space ] @ (match ty with None -> [] | Some ty -> [builtin_symbol ":"; ty]) @ [ builtin_symbol "\\def"; break;