caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Thomas Gazagnaire" <ocaml@gazagnaire.com>
To: "OCaml List" <caml-list@yquem.inria.fr>
Subject: annotate a .ml file with type information
Date: Wed, 19 Nov 2008 14:32:09 +0000	[thread overview]
Message-ID: <9722eaea0811190632l66a36f2cge1cbf7fdee5d3044@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

Hi all,

I would like to write a camlp4 extension which use infered-type information.
To do that, I can see two ways:
* either calling an type-inference function of the compiler, giving it an
AST and a context associating identifiers to types which seems to me a bit
complicated (and maybe impossible),
* or annotating the original source code with infered-type information -
which seems to me simpler. In this case, I believe that it is not difficult
to merge an ml file and its corresponding .annot file to produce a file
where every identifier is type annotated, but it seems to me a bit overkill
to do it at this stage as it would be simpler to do it directly after the
type-inference phase of the compilation. So, patching the compiler to make
it producing such a file with a special option (as -infertypes) seems also
good to me.

I would like to ask people what they are thinking of this problem and before
starting to work on it, I wondering if someone is aware or either an
existing ml-annot merger or a hidden compiler flag to produce such a file ?
Or if there is a reason why it should be not possible to do so :-)

Cheers,
Thomas

[-- Attachment #2: Type: text/html, Size: 1178 bytes --]

             reply	other threads:[~2008-11-19 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 14:32 Thomas Gazagnaire [this message]
2008-11-19 17:42 ` [Caml-list] " Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9722eaea0811190632l66a36f2cge1cbf7fdee5d3044@mail.gmail.com \
    --to=ocaml@gazagnaire.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).