caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] CDuce
@ 2003-07-04  8:20 Alain.Frisch
  2003-07-04 19:37 ` Matt Gushee
  0 siblings, 1 reply; 3+ messages in thread
From: Alain.Frisch @ 2003-07-04  8:20 UTC (permalink / raw)
  To: Caml list

Dear Caml-list,

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.  The
distribution can be downloaded at:

   http://www.cduce.org/download.html

More information can be found at:

   http://www.cduce.org/

And you can directly try CDuce with a web browser using the online
prototype at:

   http://www.cduce.org/cgi-bin/cduce

CDuce is fast, functional, type-safe, and conforms to basic standards:
Unicode, XML, DTD, Namespaces are handled, partial support of XML
Schema validation is in alpha testing (and undocumented) while queries
are being implemented.

The OCaml community could be interested in CDuce because:

- CDuce syntax is reminiscient of ML languages (but CDuce has a
  completely different type system, with subtyping and intersection,
  union, negation types, and also a different type-based
  semantics with overloaded functions and pattern matching on types);

- CDuce is written in OCaml;

- Our research plans include the development of a CDuce <-> OCaml
  interface, to allow extending CDuce with OCaml and
  using CDuce for the XML part of OCaml applications.



This is the first beta version. All your comments, suggestions, and
bug reports are welcome. Please send all of them to info@cduce.org

Thanks in advance,

  Alain Frisch, on behalf of the CDuce team.

-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] CDuce
  2003-07-04  8:20 [Caml-list] CDuce Alain.Frisch
@ 2003-07-04 19:37 ` Matt Gushee
  2003-07-04 21:50   ` Alain.Frisch
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Gushee @ 2003-07-04 19:37 UTC (permalink / raw)
  To: caml-list

On Fri, Jul 04, 2003 at 10:20:14AM +0200, Alain.Frisch@ens.fr 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>
  <a>aaaa</a>
  <b>bbbb</b>
  <c>cccc</c>
</abc>
------------------------------------------------------------- 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:
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] CDuce
  2003-07-04 19:37 ` Matt Gushee
@ 2003-07-04 21:50   ` Alain.Frisch
  0 siblings, 0 replies; 3+ messages in thread
From: Alain.Frisch @ 2003-07-04 21:50 UTC (permalink / raw)
  To: Matt Gushee; +Cc: Caml list

On Fri, 4 Jul 2003, Matt Gushee wrote:

> On Fri, Jul 04, 2003 at 10:20:14AM +0200, Alain.Frisch@ens.fr 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,

Thank you for your interest in CDuce !

> but there seems to be a problem with type inferencing in the 'load_xml'
> function. Given the following XML:
...
> # let abc : ABC = load_xml "abc.xml";;
>
> Have I done something wrong, or is this indeed a bug?

The point is that CDuce programs are statically type-checked. At "compile
time", there is no way to be sure that the result of load_xml will have
type ABC (load_xml operates at runtime), hence the type error. A possible
way to do what you want is:

let abc =
  match load_xml "abc.xml" with
    | x & ABC -> x
    | _ -> raise "Invalid input file !"

The pattern (x & ABC) succeeds when the argument of the pattern matching
(the loaded XML document) has type ABC, and it binds it to x.

> 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?

No particular reason. A "cp cduce /usr/local/bin" should do the stuff.


I suggest to keep strictly CDuce related discussions out of the Caml-list.
Interested people can send me an email to join the CDuce users mailing
list.


-- Alain

-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-04 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-04  8:20 [Caml-list] CDuce Alain.Frisch
2003-07-04 19:37 ` Matt Gushee
2003-07-04 21:50   ` Alain.Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).