Re: Writing Compilers in Functional Languages

torbenm@diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
28 Apr 2005 14:31:21 -0400

          From comp.compilers

Related articles
Writing Compilers in Functional Languages onlyafly@gmail.com (Kkaa) (2005-04-26)
Re: Writing Compilers in Functional Languages bobduff@shell01.TheWorld.com (Robert A Duff) (2005-04-28)
Re: Writing Compilers in Functional Languages stephen@dino.dnsalias.com (2005-04-28)
Re: Writing Compilers in Functional Languages cm.abo@aktivanet.de (Christian Mueller) (2005-04-28)
Re: Writing Compilers in Functional Languages torbenm@diku.dk (2005-04-28)
Re: Writing Compilers in Functional Languages arthurvl+news@cs.uu.nl (Arthur van Leeuwen) (2005-04-28)
Re: Writing Compilers in Functional Languages tarvydas@allstream.net (Paul Tarvydas) (2005-04-28)
Re: Writing Compilers in Functional Languages neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2005-04-28)
Re: Writing Compilers in Functional Languages awwaiid@thelackthereof.org (Brock) (2005-04-28)
Re: Writing Compilers in Functional Languages torbenm@diku.dk (2005-04-30)
Re: Writing Compilers in Functional Languages neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2005-05-02)
[3 later articles]
| List of all articles for this month |

From: torbenm@diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
Newsgroups: comp.compilers
Date: 28 Apr 2005 14:31:21 -0400
Organization: Department of Computer Science, University of Copenhagen
References: 05-04-068
Keywords: functional

"Kkaa" <onlyafly@gmail.com> writes:


> I've written a few compilers and interpreters in procedural and
> object-oriented languages (in particular Java, C, C++, and C#), and
> these seem to be popular choices, but I would like to write my next
> one in a functional language. Every compiler text I've read assumes
> that you are writing your compiler in a procedural or OO language.
> Are there any books or online resources that instead focus on using
> functional languages as implementation languages? I'm considering
> using Haskell or Scheme, but I'm hoping that the resources won't
> assume a particular functional langauge.


Some possibilities:


Andrew Appel: Modern Compiler Implementation in ML. This assumes
Standard ML as the implementation language and sometimes uses some
very ML-specific programming techniques. There are related books
using Java and C that differ only in the programming examples.




Abelson and Sussman: Structure and Interpretation of Computer Programs
(available online at http://mitpress.mit.edu/sicp/) describes
interpetation and compilation of programs using Scheme.


Andrew Appel's "Compiling with Continuations" describes an ML compiler
written in ML.


I'm not aware of a compiler text using Haskell or assuming a
non-specific functional language. I use my own notes for my compiler
class and these don't assume any particular language (nor does it go
into very much detail about implementation), but has occasional hints
of how the high-level descriptions used in the notes can be
implemented in imperative or functional languages. I use Standard ML
for the project in the course. The notes are not currently available
online, but if you are interested, I can mail you a PDF file.


                Torben


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.