Hi Tim,

Am Freitag, den 17.11.2017, 13:05 -0500 schrieb Tim Sheard:
> 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 
> string.

maybe not quite what you are looking for, but veggies, at
https://github.com/nomeata/veggies
uses the GHC API build a “new” Haskell compiler with its own Core→LLVM
pass. 

Cheers,
Joachim
-- 
Joachim Breitner
  m...@joachim-breitner.de
  http://www.joachim-breitner.de/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to