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
Extracting common information
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Peter Ilberg <peter.ilberg@g...>
Subject: Re: [Caml-list] Extracting common information
On Thu, 24 May 2007, Niko Matsakis <> 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  
with annotations in section 6.2 (page 225) of "Implementing functional
languages: a tutorial". (You might have to read chapter 1 for background  
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:

--- Peter