<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/427d93c8bda6d480ea0c18c1c4d5b6ff"
  from="Matt Gushee &lt;mgushee@h...&gt;"
  author="Matt Gushee"
  date="2003-07-04T19:37:11"
  subject="Re: [Caml-list] CDuce"
  prev="2003/07/f026587a56318a82e2ddd00306de1a33"
  next="2003/07/9265629f02a5161f666b1798bc5cc5e1"
  prev-in-thread="2003/07/abf5ceeae667fb34e9e077ec470362fb"
  next-in-thread="2003/07/21695e1546cd0d7c3589874712a38466"
  prev-thread="2003/07/1af2bb59803449d5aba637a7223a6f2a"
  next-thread="2003/07/6d54ebe42cd1491a5c32cf6e278324db"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] CDuce">
<msg 
  url="2003/07/abf5ceeae667fb34e9e077ec470362fb"
  from="Alain.Frisch@e..."
  author="Alain.Frisch@e..."
  date="2003-07-04T08:20:20"
  subject="[Caml-list] CDuce">
<msg 
  url="2003/07/427d93c8bda6d480ea0c18c1c4d5b6ff"
  from="Matt Gushee &lt;mgushee@h...&gt;"
  author="Matt Gushee"
  date="2003-07-04T19:37:11"
  subject="Re: [Caml-list] CDuce">
<msg 
  url="2003/07/21695e1546cd0d7c3589874712a38466"
  from="Alain.Frisch@e..."
  author="Alain.Frisch@e..."
  date="2003-07-04T21:50:11"
  subject="Re: [Caml-list] CDuce">
</msg>
</msg>
</msg>
</thread>

<contents>
On Fri, Jul 04, 2003 at 10:20:14AM +0200, Alain.Frisch@ens.fr wrote:
&gt; 
&gt; I'm pleased to announce the first public release of CDuce, a new
&gt; strongly typed higher-order functional programming language for XML
&gt; documents with an efficient type-based runtime implementation.

This is very interesting. I've compiled it and begun learning the language,
but there seems to be a problem with type inferencing in the 'load_xml'
function. Given the following XML:

-- abc.xml -------------------------------------------------------------
&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
&lt;abc&gt;
  &lt;a&gt;aaaa&lt;/a&gt;
  &lt;b&gt;bbbb&lt;/b&gt;
  &lt;c&gt;cccc&lt;/c&gt;
&lt;/abc&gt;
------------------------------------------------------------- abc.xml --

My CDuce session looks like this:

        CDuce version 0.1.0

# type ABC = &lt;abc&gt; [ A B C ]
&gt; type A = &lt;a&gt; [ PCDATA ]
&gt; type B = &lt;b&gt; [ PCDATA ]
&gt; type C = &lt;c&gt; [ PCDATA ];;
# let abc : ABC = load_xml "abc.xml";;
Error at chars 16-34:
This expression should have type:
ABC
but its inferred type is:
Any
which is not a subtype, as shown by the sample:
Int


Have I done something wrong, or is this indeed a bug?


P.S.: Is there any particular reason your makefile doesn't have an
  ordinary 'install' target, so that people can easily install the 
  tools for command-line use?

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

