blob: 093727f2f12768e85aeb3d34303b728e87382c40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
(***********************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
(* \VV/ *************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(***********************************************************************)
(******************************************************************************)
(* *)
(* PROJECT HELM *)
(* *)
(* A module to print Coq objects in XML *)
(* *)
(* Claudio Sacerdoti Coen <sacerdot@cs.unibo.it> *)
(* 06/12/2000 *)
(* *)
(* This module adds to the vernacular interpreter the functions that fullfill *)
(* the new commands defined in Xml.v *)
(* *)
(******************************************************************************)
open Util;;
open Vernacinterp;;
vinterp_add "Print"
(function
[VARG_QUALID id] ->
(fun () -> Xmlcommand.print id None)
| [VARG_QUALID id ; VARG_STRING fn] ->
(fun () -> Xmlcommand.print id (Some fn))
| _ -> anomaly "This should be trapped");;
vinterp_add "Show"
(function
[] ->
(fun () -> Xmlcommand.show None)
| [VARG_STRING fn] ->
(fun () -> Xmlcommand.show (Some fn))
| _ -> anomaly "This should be trapped");;
vinterp_add "XmlPrintAll"
(function
[] -> (fun () -> Xmlcommand.printAll ())
| _ -> anomaly "This should be trapped");;
vinterp_add "XmlPrintModule"
(function
[VARG_IDENTIFIER id] -> (fun () -> Xmlcommand.printModule id None)
| [VARG_IDENTIFIER id ; VARG_STRING dn] ->
(fun () -> Xmlcommand.printModule id (Some dn))
| _ -> anomaly "This should be trapped");;
vinterp_add "XmlPrintSection"
(function
[VARG_IDENTIFIER id] -> (fun () -> Xmlcommand.printSection id None)
| [VARG_IDENTIFIER id ; VARG_STRING dn] ->
(fun () -> Xmlcommand.printSection id (Some dn))
| _ -> anomaly "This should be trapped");;
|