Re: True multi stage Haskell

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: True multi stage Haskell

David Feuer-2
I don't know anything myself, but if you're doing anything remotely related to Haskell and macro systems, you should probably read up on what Alexis King (AKA lexi-lambda) has been up to lately, and maybe get in touch with her.

David Feuer
Well-Typed, LLP

-------- Original message --------
From: Tim Sheard <[hidden email]>
Date: 11/17/17 1:05 PM (GMT-05:00)
Subject: True multi stage Haskell

After many years of hoping someone else would do this, I would like to
make GHC into a true multi-stage programming language. Here is how I
thought I might approach this.

1) Use the GHC as a library module.
2) Use the LLVM backend.

I have no experience with either of these tools.
Lets start simple, How would I write functions like

compile :: String -> IO PtrToLLVMCode  -- where the string is a small
Haskell program.
llvmCompile :: PtrToLLVMCode -> IO PtrToMachineCode
jumpTo:: PtrToMachineCode -> IO ans   -- where ans is the "type" of the

Any thoughts on how to get started? What papers to read, examples to
look at?

I'd love to move to some more disciplined input type, a sort of (mono)
typed program
representation (with similar complexity) to Template Haskell Exp type.

where (Exp t) is a data structure representing a Haskell program of type t.

All offers of advice accepted. I'm trying to get started soon, and good
about what to avoid is especially welcome.  If any one wanted to help
with this,
that would be great.

Tim Sheard

ghc-devs mailing list
[hidden email]

ghc-devs mailing list
[hidden email]