[Haskell-cafe] Materials on Compiling Functional Languages. (Gil Mizrahi)

Kei Davis kei at lanl.gov
Thu Mar 10 17:04:51 UTC 2016

>> Hi Cafe,
>> I'm looking for materials on compiling functional languages. The
>> materials that I was able to gather from the web were kind of all over
>> the place, so I'm hoping someone could help me out with something more
>> in order for a novice.
>> Starting from something specific and simple so I could have something
>> small and concrete to implement, play and ponder about. And then
>> going forward with more advanced materials about different
>> optimization strategies for eager and lazy languages or what could be
>> achieved when limiting yourself only to a total language, etc.
>> Cheers,
>> Max.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe <at> haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Hi Maksymilian,
> Here you'll find a (perhaps not so) short list I've accumulated:
> http://pastemarkdown.com/XUEvs
> and here it is in markdown format:
> - [Implementing a JIT Compiled Language with Haskell and
> LLVM](http://www.stephendiehl.com/llvm/)
> - [Write You a Haskell](http://dev.stephendiehl.com/fun/index.html)
> - [Theory and Implementation of a Functional Programming
> Language](http://www.rose-hulman.edu/mathjournal/archives/2000/vol1-n2/paper3/v1n2-3pd.pdf)
> - [Implementing Functional Programming
> Languages](http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/slpj-book-1987.pdf)
> - SPJ
> - [Implementing Functional Langauges: a
> tutorial](http://research.microsoft.com/en-us/um/people/simonpj/Papers/pj-lester-book/)
> - SPJ
> - [Practical Implementation of a Dependently Typed Functional Programming
> Language | Brady](http://compsoc.dur.ac.uk/~ecb/proofread/thesis.pdf)
> -
> [PLAI](http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/plai-2007-04-26.pdf)
> - [STG
> Machine](http://www.dcc.fc.up.pt/~pbv/aulas/linguagens/peytonjones92implementing.pdf)
> - [Typing Haskell in
> Haskell](http://web.cecs.pdx.edu/~mpj/thih/TypingHaskellInHaskell.html
> - [Practical type inference for arbitrary-rank types / SPJ et
> al.](http://research.microsoft.com/en-us/um/people/simonpj/papers/higher-rank/putting.pdf)
> - Compiling with Continuations - Appel
> - [PureScript Compiler](https://github.com/purescript/purescript)
> Cheers and good luck,
> Gil

Nice list Gil.

We've recently implemented a pure FL compiler.

We started with the "stock hardware" paper ([STG Machine] in Gil's 
list), but it's somewhat dated (e.g. they're still using a trampoline).  
Our main reference was the "fast curry" paper:


Bernie Pope's MiniSTG is a useful learning tool based on that paper:


Our type inferencer currently handles ADTs including unboxed types. I 
strongly recommend


supplemented by


Then if you get serious [Typing Haskell in Haskell] in Gil's list.

For compiling pattern matching we started with one of the [Implementing 
Functional ...] in Gil's list, then found some other references online 
(I don't know exactly which--I didn't implement that part).

For a parallel implementation we started with


Then there are subsequent papers that can be found on SPJ's publication 

Hope this helps, it helped us!


Kei Davis
Applied Computer Science Group CCS-7, Mail Stop B287
Los Alamos National Laboratory
Los Alamos, NM 87545, U.S.A.

More information about the Haskell-Cafe mailing list