Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] easy reading of data structures?

Expand Messages
  • Nicolas Cannasse
    ... writing ... purpose, ... There is something for camlp4 called IOXml that can do some printing of caml types as XML documents. But I have been thinking for
    Message 1 of 3 , Apr 29, 2003
    • 0 Attachment
      > > The other is easy I/O of data structures: a way to convert a
      > > human-readable representation into an internal data structure and
      > > vice-versa. The toplevel lets me enter and print a structure as a
      > > literal, and I'd like the same feature in my programs. Marhsalling
      > > seems to provide this for binary data only. Lisp's READ and PRINT
      > > give an instant file format, which is great for prototyping.
      > > Currently I must laboriously write a parser and printer for each
      > > important data type I write. What is the nearest equivalent in OCaml?
      > > (I don't think I want XML formatting, as I recall some OCaml package
      > > providing, since it is so verbose.)
      >
      >
      > Lookie! Somebody else wants read/show like functions a la Haskell!
      >
      > The elves in the misty mountains tell me that it's possible to do that
      writing
      > some fancy p4 code, but it would be hard to write a library for this
      purpose,
      > owing to the lack of overloading in ocaml (dammit!)

      There is something for camlp4 called IOXml that can do some printing of caml
      types as XML documents. But I have been thinking for few weeks now about
      writing such a library in pure OCaml, that will use informations contained
      in a CMI file, with additionnal features such as "remote" printing thru
      sockets to enable remote or local real-time debugging. Still need to think
      about it some time...

      Nicolas Cannasse
    Your message has been successfully submitted and would be delivered to recipients shortly.