If no CDuce file is given on the command line, the interpreter
behaves as an interactive toplevel.
Toplevel phrases are processed after each ;;.
Mutually recursive declarations of types or functions
must be contained in a single adjacent sequence of phrases
(without ;; inbetween).
You can quit the toplevel with the toplevel directive
#quit but also with either Ctrl-C or
Ctrl-D. Another option is to use the built-in
exit.
The toplevel directive #help prints an help message about
the available toplevel directives.
The toplevel directive #env prints the current
environment: the set of defined global types and values, and also
the current sets of prefix-to-namespace bindings used
for parsing (as defined by the user) and
for pretty-printing (as computed by CDuce itself).
The two toplevel directives #silent and
#verbose can be used to turn down and up toplevel
outputs (results of typing and evaluation).
The toplevel directive #reinit_ns reinit the
table of prefix-to-namespace bindings used for pretty-printing
values and types with namespaces (see XML Namespaces).
The toplevel directive #print_type shows a representationo of a
CDuce type (including types imported from XML
Schema documents).
The toplevel directive #builtins prints the name
of embedded OCaml values (see Interfacing CDuce with OCaml).
The toplevel has no line editing facilities.
You can use an external wrapper such as
ledit.
|