Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 55 lines (44 sloc) 2.226 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (*
19 @author Louis Gesbert
20 **)
21
22 (** This module provides a facility for generating an XML tree that follows the
23 structure of an OPA database. It first extracts the schema from that
24 database (as saved by OPA programs thanks to dbGen), then uses it to follow
25 the data and to structure the XML. XML dump format is documented in the opa
26 stdlib.
27
28 See also Xml_import, that loads back the same XML format into a database.
29 *)
30
31 (** The version number of the XML format *)
32 val xml_dump_version : string
33
34 (** We want to be CPS but continuation-implementation agnostic, hence the
35 following functor on continuation type, creation and application. *)
36 module type SigCpsBackend = sig
37 type 'a continuation
38 (** the type of continuations that take ['a] (typically ['a -> unit]) *)
39 val mkcont : 'b continuation -> ('a -> unit) -> 'a continuation
40 (** construction of a new continuation (first arg. may be used for context information) *)
41 val return : 'a -> 'a continuation -> unit
42 (** application of a continuation (usually bound to the [|>] operator) *)
43 end
44
45 module F : functor (C: SigCpsBackend) -> sig
46
47 (** [to_file db_read filename @> k] dumps the badop database accessible
48 through function [db_read] to the file named [filename]. [db_read] has the
49 same type as the partial application of [Badop.read] to a transaction. *)
50 val to_file :
51 (Badop.path -> (Badop.Dialog.query, 'rev) Badop.generic_read_op -> (Badop.Dialog.response, 'rev) Badop.generic_read_op Badop.answer Cps.t) ->
52 string ->
53 unit C.continuation -> unit
54 end
Something went wrong with that request. Please try again.