Related articles |
---|
[3 earlier articles] |
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) |
Re: Writing Compilers in Functional Languages alcremi@pobox.com (Alain Cremieux) (2005-05-03) |
Re: Writing Compilers in Functional Languages YRassokhin@luxoft.com (2005-05-05) |
Re: Writing Compilers in Functional Languages ali@olympe.ch (Ali Al-Shabibi) (2005-05-13) |
From: | torbenm@diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=) |
Newsgroups: | comp.compilers |
Date: | 30 Apr 2005 10:59:11 -0400 |
Organization: | Department of Computer Science, University of Copenhagen |
References: | 05-04-068 05-04-084 |
Keywords: | functional |
Posted-Date: | 30 Apr 2005 10:59:11 EDT |
Neelakantan Krishnaswami <neelk@cs.cmu.edu> writes:
> Kkaa wrote:
> >
> > 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.
>
> Try Andrew Appel's _Modern Compiler Implementation in ML_. It uses
> Standard ML, but translating to Haskell should be fairly straight
> forward.
I not sure about this. Appel's book uses updatable references in many
places, such as for name generation and hash tables. These are not
easily translated into Haskell. The same is true for exceptions.
Additionally, though SML and Haskell are both functional languages,
the "traditional" programming style for these is quite different - you
would tend to use type classes, list comprehensions and monads in
Haskell, and these are not found in SML. So translating a program
directly from SML to Haskell will not be trivial and the result will
be very atypical Haskell.
But I agree that if you understand Haskell and SML quite well, you
should be able to carry many of the functional techniques (such as
pattern matching and higher-order functions) over from SML to Haskell.
Torben
Return to the
comp.compilers page.
Search the
comp.compilers archives again.