Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Peter Ilberg" <peter.ilberg@gmail.com>
To: "Niko Matsakis" <niko@alum.mit.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Extracting common information
Date: Thu, 24 May 2007 13:00:28 -0500	[thread overview]
Message-ID: <op.tsuey2k6d9atr4@tomato.amer.corp.natinst.com> (raw)
In-Reply-To: <604682010705240723v609af56eq13380ced449565c@mail.gmail.com>

On Thu, 24 May 2007, Niko Matsakis <niko@alum.mit.edu> wrote:
> I am working on a simple compiler in Ocaml, and having some difficulty
> settling on the best design for my AST.
[...]
> then I realized I would want to thread along some annotation to store  
> the types, line numbers, and things like that.

Simon Peyton Jones and David Lester discuss some options for an AST  
datatype
with annotations in section 6.2 (page 225) of "Implementing functional
languages: a tutorial". (You might have to read chapter 1 for background  
info.)
They use Haskell, but their solution should be relatively easy to port to
Ocaml, if you decide to use it.

You can find the book at:

http://research.microsoft.com/~simonpj/Papers/pj-lester-book/

--- Peter


  reply	other threads:[~2007-05-24 18:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 11:04 Niko Matsakis
2007-05-24 11:31 ` [Caml-list] " Romain
2007-05-24 11:44 ` Bünzli Daniel
2007-05-24 14:09 ` skaller
2007-05-24 14:23 ` Stephen Weeks
2007-05-24 18:00   ` Peter Ilberg [this message]
2007-05-28 19:00     ` Niko Matsakis

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=op.tsuey2k6d9atr4@tomato.amer.corp.natinst.com \
    --to=peter.ilberg@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=niko@alum.mit.edu \
    /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