| NSmartApply (_,t) -> "fixme"
| NAuto (_,(None,flgs)) ->
"nautobatch" ^
String.concat " " (List.map (fun a,b -> a ^ "=" ^ b) flgs)
| NAuto (_,(Some l,flgs)) ->
"nautobatch" ^ " by " ^
| NSmartApply (_,t) -> "fixme"
| NAuto (_,(None,flgs)) ->
"nautobatch" ^
String.concat " " (List.map (fun a,b -> a ^ "=" ^ b) flgs)
| NAuto (_,(Some l,flgs)) ->
"nautobatch" ^ " by " ^
"...to be implemented..." ^ " " ^ "...to be implemented..."
| NConstructor (_,None,l) -> "@ " ^
"...to be implemented..." ^ " " ^ "...to be implemented..."
| NConstructor (_,None,l) -> "@ " ^
| NCase1 (_,n) -> "*" ^ n ^ ":"
| NChange (_,what,wwhat) -> "nchange " ^ "...to be implemented..." ^
| NCase1 (_,n) -> "*" ^ n ^ ":"
| NChange (_,what,wwhat) -> "nchange " ^ "...to be implemented..." ^
- " with " ^ NotationPp.pp_term wwhat
- | NCut (_,t) -> "ncut " ^ NotationPp.pp_term t
-(*| NDiscriminate (_,t) -> "ndiscriminate " ^ NotationPp.pp_term t
- | NSubst (_,t) -> "nsubst " ^ NotationPp.pp_term t *)
+ " with " ^ NotationPp.pp_term status wwhat
+ | NCut (_,t) -> "ncut " ^ NotationPp.pp_term status t
+(*| NDiscriminate (_,t) -> "ndiscriminate " ^ NotationPp.pp_term status t
+ | NSubst (_,t) -> "nsubst " ^ NotationPp.pp_term status t *)
+ | NClear (_,l) -> "nclear " ^ String.concat " " l
"...to be implemented..." ^ " " ^ "...to be implemented..."
| NId _ -> "nid"
| NIntro (_,n) -> "#" ^ n
| NIntros (_,l) -> "#" ^ String.concat " " l
"...to be implemented..." ^ " " ^ "...to be implemented..."
| NId _ -> "nid"
| NIntro (_,n) -> "#" ^ n
| NIntros (_,l) -> "#" ^ String.concat " " l
| NRewrite (_,dir,n,where) -> "nrewrite " ^
(match dir with `LeftToRight -> ">" | `RightToLeft -> "<") ^
| NRewrite (_,dir,n,where) -> "nrewrite " ^
(match dir with `LeftToRight -> ">" | `RightToLeft -> "<") ^
- "(" ^ String.concat " " (List.map (pp_ntactic ~map_unicode_to_tex) l)^ ")"
- | NRepeat (_,t) -> "nrepeat " ^ pp_ntactic ~map_unicode_to_tex t
+ "(" ^ String.concat " " (List.map (pp_ntactic status ~map_unicode_to_tex) l)^ ")"
+ | NRepeat (_,t) -> "nrepeat " ^ pp_ntactic status ~map_unicode_to_tex t
-let pp_nmacro = function
- | NCheck (_, term) -> Printf.sprintf "ncheck %s" (NotationPp.pp_term term)
+let pp_nmacro status = function
+ | NCheck (_, term) -> Printf.sprintf "ncheck %s" (NotationPp.pp_term status term)
- | NObj (_,obj) -> NotationPp.pp_obj NotationPp.pp_term obj
- | NQed (_) -> "nqed"
+ | NObj (_,obj,index) ->
+ (if not index then "-" else "") ^
+ NotationPp.pp_obj (NotationPp.pp_term status) obj
+ | NQed (_,true) -> "qed"
+ | NQed (_,false) -> "qed-"
| NCopy (_,name,uri,map) ->
"copy " ^ name ^ " from " ^ NUri.string_of_uri uri ^ " with " ^
String.concat " and "
| NCopy (_,name,uri,map) ->
"copy " ^ name ^ " from " ^ NUri.string_of_uri uri ^ " with " ^
String.concat " and "
map)
| Include (_,mode,path) -> (* not precise, since path is absolute *)
if mode = WithPreferences then
map)
| Include (_,mode,path) -> (* not precise, since path is absolute *)
if mode = WithPreferences then
| Alias (_,s) -> pp_alias s
| Interpretation (_, dsc, (symbol, arg_patterns), cic_appl_pattern) ->
pp_interpretation dsc symbol arg_patterns cic_appl_pattern
| Notation (_, dir_opt, l1_pattern, assoc, prec, l2_pattern) ->
| Alias (_,s) -> pp_alias s
| Interpretation (_, dsc, (symbol, arg_patterns), cic_appl_pattern) ->
pp_interpretation dsc symbol arg_patterns cic_appl_pattern
| Notation (_, dir_opt, l1_pattern, assoc, prec, l2_pattern) ->
-let pp_command = function
- | Print (_,s) -> "print " ^ s
- | Set (_, name, value) -> Printf.sprintf "set \"%s\" \"%s\"" name value
-
-let pp_executable ~map_unicode_to_tex =
+let pp_executable status ~map_unicode_to_tex =
- String.concat " " (List.map (pp_ntactic ~map_unicode_to_tex) tacl)
- | Command (_, cmd) -> pp_command cmd ^ "."
- | NCommand (_, cmd) -> pp_ncommand cmd ^ "."
+ String.concat " " (List.map (pp_ntactic status ~map_unicode_to_tex) tacl)
+ | NCommand (_, cmd) -> pp_ncommand status cmd ^ "."
function
| Note (_,"") -> Printf.sprintf "\n"
| Note (_,str) -> Printf.sprintf "\n(* %s *)" str
| Code (_,code) ->
function
| Note (_,"") -> Printf.sprintf "\n"
| Note (_,str) -> Printf.sprintf "\n(* %s *)" str
| Code (_,code) ->
- | Executable (_, ex) -> pp_executable ex
- | Comment (_, c) -> pp_comment c
+ | Executable (_, ex) -> pp_executable status ex
+ | Comment (_, c) -> pp_comment status c