Commit a6568bd3 authored by Pietro Abate's avatar Pietro Abate

[r2006-10-03 09:39:57 by afrisch] Empty log message

Original author: afrisch
Date: 2006-10-03 09:39:58+00:00
parent c444c3a8
After 0.4.0pl1
0.4.1
- Error message when using --mlstub without the built-in OCaml interface
- New Caml_int builtin type
- Tools:
* Error message when using --mlstub without the built-in OCaml interface
* Improvements to the type pretty-printer
* "include" uses the -I options
- Language:
* New Caml_int builtin type
* The // construction no longer stops at the first matched subtree
on each branch
* New "dump_xml" and "dump_xml_utf8", equivalent to the composition
of print and print_xml, but more efficient
- Implementation:
* New subtyping algorithm
* Small improvement to the pattern matching compiler
* Improve type-checking time for map
* Improve type-checking of record expressions
* Don't display warnings for unused branches in ghost (generated) pattern
matching
- Bug fix:
* "eval" can now be called several times and use the toplevel environment
* use "open_out_bin" (needed for Cygwin installation)
* "open" allowed as tag name
* exceptions raised by the expat parser and by the dump_to_file
primitives are now catchable
* work-around the double close bug in OCaml
0.4.0pl1
......
VERSION=0.4.0
VERSION=0.4.1
......@@ -153,9 +153,7 @@ let compile_let_decl env decl =
let env = enter_globals env (Patterns.fv pat) in
let te = decl.Typed.let_body.Typed.exp_typ in
let comp =
Patterns.Compile.make_branches
(te (* Types.descr (Patterns.accept pat)*)) [ pat, () ] in
let comp = Patterns.Compile.make_branches te [ pat, () ] in
let (disp, n) =
match comp with
| (disp, [| Auto_pat.Match (n, ()) |]) -> (disp,n)
......
......@@ -108,7 +108,6 @@ let rec print_exn ppf = function
print_norm s;
Format.fprintf ppf "which is not a subtype, as shown by the sample:@.%a@."
print_sample (Sample.get (Types.diff s t))
(* Types.Witness.print_witness (Types.witness (Types.diff s t)) *)
| Typer.NonExhaustive t ->
Format.fprintf ppf "This pattern matching is not exhaustive@.";
Format.fprintf ppf "Residual type:@.%a@."
......
The CDuce compiler
Alain Frisch <Alain.Frisch@inria.fr> and the CDuce team
Copyright CNRS,INRIA, 2003,2004,2005 (see LICENSE for details)
Copyright CNRS,INRIA, 2003,2004,2005,2006 (see LICENSE for details)
......@@ -216,12 +216,16 @@ register_fun "print_xml_utf8"
register_fun "dump_xml"
Types.any string_latin1
(fun v -> Print_xml.dump_xml ~utf8:false !Eval.ns_table v);;
Types.any nil
(fun v ->
Location.protect_op "print";
Print_xml.dump_xml ~utf8:false !Eval.ns_table v);;
register_fun "dump_xml_utf8"
Types.any string
(fun v -> Print_xml.dump_xml ~utf8:true !Eval.ns_table v);;
Types.any nil
(fun v ->
Location.protect_op "print";
Print_xml.dump_xml ~utf8:true !Eval.ns_table v);;
register_fun "print"
......
......@@ -21,7 +21,6 @@ This Guide describes all CDuce's constructions.
</left>
<box title="Table of Contents" link="toc">
<p><b>This manual is under construction !</b></p>
<p>Sections:</p>
<pages-toc sections=""/>
</box>
......
......@@ -521,6 +521,15 @@ in the section on <a href="#io">Input/output</a>.
In both cases, the resulting string does <em>not</em> contain
the XML prefix "&lt;?xml ...>".
</p>
<sample><![CDATA[
dump_xml: Any -> []
dump_xml_utf8: Any -> []
]]></sample>
<p>
These functions behave has <code>print_xml</code> and
<code>print_xml_utf8</code> but send the result to the standard
output.
</p>
</section>
<section title="Projection">
......
......@@ -50,7 +50,7 @@ href="manual_interfacewithocaml"/> page for more information.
<li>
<sample>
cduce [OPTIONS ...] --run [ {{script}}.cd ... ] [--arg ARGUMENT ...]
cduce [OPTIONS ...] --run [ {{script}}.cdo ... ] [--arg ARGUMENT ...]
</sample>
<p>
The command runs one or several pre-compiled scripts.
......
......@@ -86,6 +86,8 @@ _" character, starting by a lowercase letter or underscore.</li>
<br/><code>print_xml_utf8</code> : Any -> String,
<br/><code>print</code> : Latin1 -> [],
<br/><code>print_utf8</code> : String -> [],
<br/><code>dump_xml</code> : Any -> [],
<br/><code>dump_xml_utf8</code> : Any -> [],
<br/><code>int_of</code> : String -> Int,
<br/><code>float_of</code> : String -> Float,
<br/><code>string_of</code> : Any -> Latin1,
......@@ -195,7 +197,8 @@ field <code>l</code> is not present)</li>
transformation is recursively applied to the sequence of children of the unmatched
element; as for transform, each branch returns a sequence
and all the resulting sequences are concatenated together. </li>
<li>Operators: <code>load_xml : Latin1 -> AnyXml; print_xml : Any -> Latin1</code>
<li>Operators: <code>load_xml : Latin1 -> AnyXml; print_xml : Any ->
Latin1; dump_xml : Any -> []</code>
</li>
</ul>
</box>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment