module OASISDataNotation:sig..end
This module helps to translate OCaml data into a string following
OCaml syntax.
typemodule_name =string
typefield_name =string
typevariant_name =string
typevar_name =string
type t =
| |
REC of |
(* |
List
| *) |
| |
LST of |
(* |
String
| *) |
| |
STR of |
(* |
Variant type constructor
| *) |
| |
VRT of |
(* |
Boolean
| *) |
| |
BOO of |
(* |
Tuple
| *) |
| |
TPL of |
(* |
Unit ()
| *) |
| |
UNT |
(* |
Function application
| *) |
| |
APP of |
(* |
Variable
| *) |
| |
VAR of |
(* |
Polymorphic variant
| *) |
| |
PVR of |
val of_unit : unit -> t
val of_bool : bool -> t
val of_string : string -> t
val of_option : ('a -> t) -> 'a option -> t
val of_list : ('a -> t) -> 'a list -> ttype 'a func = {
|
func_call : |
|
func_name : |
|
func_arg : |
func_arg).val func : 'a -> string -> 'a funcfunc.val func_with_arg : ('a -> 'b) ->
string -> 'a -> ('a -> t) -> 'b funcval func_with_arg_ctxt : (ctxt:'a -> 'b -> 'c) ->
string ->
'b -> ('b -> t) -> (ctxt:'a -> 'c) func
val odn_of_func : 'a func -> tt code corresponding to a func.val func_call : 'a func -> 'afunc.val pp_odn : ?opened_modules:string list ->
Format.formatter -> t -> unit