from Hacker News

Write Yourself a Haskell in Lisp

by malloc47 on 2/17/13, 4:12 PM with 13 comments

  • by tikhonj on 2/17/13, 10:31 PM

    If you're interested in something similar but a little more theoretical, take a look at "Simply Easy"[1], a little paper on implementing a couple of variations on the lambda calculus. The main idea is to demonstrate how to evaluate a dependently typed language.

    It starts by looking at how to evaluate the simply typed lambda calculus and then going from that to a dependently typed lambda calculus. Surprisingly, the transformation is not all that complicated!

    The actual code is in Haskell.

    [1]: http://strictlypositive.org/Easy.pdf

  • by saosebastiao on 2/17/13, 5:05 PM

    Cool. Does it qualify as some sort of mutual recursion if you use haskell to build a lisp which builds haskell?
  • by Quiark on 2/18/13, 1:30 PM

    Hehe, I love this. I have been doing something similar, writing a compiler of Scheme-like language to x86 in Haskell.

    https://bitbucket.org/quiark/hsc

    The whole purpose of that mental gymnastics was to learn x86 assembly while practicing my Haskell ;)

  • by huhsamovar on 2/17/13, 11:39 PM

    Another 'X written in Y' post. Awesome.

    I think I'll save myself the wasted time and just use X from the get-go.

  • by Raphael on 2/17/13, 7:08 PM

    Make the Yule-tide gay.