

Implementing a JIT Compiled Language with Haskell and LLVM - niels
http://www.stephendiehl.com/llvm/

======
lallysingh
Even if you're not curious about Haskell, have a look at the parser here.
Parsing in Haskell feels like cheating.

~~~
tel
(And is a really great example motivating both monads and monad transformers,
for the curious!)

~~~
freyrs3
The shallow DSL in the LLVM monad is really nice, it looks almost like the IR
itself but you can abstract over it and compose it with other code. DSLs are
often overlooked when talking about monad use cases.

~~~
tel
I really need to explore LLVM in more detail at some point.

------
batterseapower
A while ago I wrote a Haskell compiler for a simple functional language that
uses the JIT features of LLVM in order to make the Haskell-level "compile"
function lazy in the term being compiled. Quite a fun trick I thought:
[https://github.com/batterseapower/productive-
compiler/blob/m...](https://github.com/batterseapower/productive-
compiler/blob/master/Main.hs)

------
taspeotis
Good job with that trailing /

    
    
        Implementing a JIT Compiled Language with Haskell and LLVM (stephendiehl.com)
        195 points by rwosync 53 days ago | flag | comments
    

[https://news.ycombinator.com/item?id=7031998](https://news.ycombinator.com/item?id=7031998)

~~~
thirsteh
Let's not make this like reddit where there's scores of people who have
nothing to do but complain about something they've already seen.

If it's interesting, it's interesting. If it's not worthy of being seen again,
it won't be upvoted. By all means link to the previous discussion, but quit
the whining.

~~~
taspeotis
Reddit hasn't been intentionally coded to avoid duplicate submissions.

