Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (44 sloc) 2.197 kB
(*
Copyright © 2011 MLstate
This file is part of OPA.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
(*
@author Louis Gesbert
**)
(** This module provides a facility for generating an XML tree that follows the
structure of an OPA database. It first extracts the schema from that
database (as saved by OPA programs thanks to dbGen), then uses it to follow
the data and to structure the XML. XML dump format is documented in the opa
stdlib.
See also Xml_import, that loads back the same XML format into a database.
*)
(** The version number of the XML format *)
val xml_dump_version : string
(** We want to be CPS but continuation-implementation agnostic, hence the
following functor on continuation type, creation and application. *)
module type SigCpsBackend = sig
type 'a continuation
(** the type of continuations that take ['a] (typically ['a -> unit]) *)
val mkcont : 'b continuation -> ('a -> unit) -> 'a continuation
(** construction of a new continuation (first arg. may be used for context information) *)
val return : 'a -> 'a continuation -> unit
(** application of a continuation (usually bound to the [|>] operator) *)
end
module F : functor (C: SigCpsBackend) -> sig
(** [to_file db_read filename @> k] dumps the badop database accessible
through function [db_read] to the file named [filename]. [db_read] has the
same type as the partial application of [Badop.read] to a transaction. *)
val to_file :
(Badop.path -> (Badop.Dialog.query, 'rev) Badop.generic_read_op -> (Badop.Dialog.response, 'rev) Badop.generic_read_op Badop.answer Cps.t) ->
string ->
unit C.continuation -> unit
end
Jump to Line
Something went wrong with that request. Please try again.