Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] CDuce
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-07-04 (19:37)
From: Matt Gushee <mgushee@h...>
Subject: Re: [Caml-list] CDuce
On Fri, Jul 04, 2003 at 10:20:14AM +0200, wrote:
> I'm pleased to announce the first public release of CDuce, a new
> strongly typed higher-order functional programming language for XML
> 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 -------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
------------------------------------------------------------- abc.xml --

My CDuce session looks like this:

        CDuce version 0.1.0

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

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           its fields;   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                            --Lao Tzu (Peter Merel, trans.)

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: