Hi Ömer Are you rewriting Eijiro Sumii's MinCaml in Haskell? I did the same a couple of years ago, though I used Parsec for parsing and only implemented the higher transformations (beta reduction, inlining, constant folding, useless variable elimination). As I have no access to a Sparc machine, I didn't go as far as closure conversion and code generation. The code was only for my personal learning as MinCaml was the nicest / smallest real compiler I could find. Code is in my Google repository - it might be useful for reference, obviously for a learning exercise you'd want to do-it-yourself: https://code.google.com/p/copperbox/source/browse/ >> trunk >> compiler >> HMinCaml Best wishes Stephen On 9 March 2014 19:18, Ömer Sinan Ağacan <omeragacan@gmail.com> wrote: [Snip]
Working code: * Lexer(Alex): https://github.com/osa1/minCaml.hs/blob/master/src/Lexer.x * Parser(Happy): https://github.com/osa1/minCaml.hs/blob/master/src/Parser.y