<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>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.</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><div style="font-size:85%;color:#575757">David Feuer</div><div style="font-size:85%;color:#575757">Well-Typed, LLP</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Tim Sheard <sheard@pdx.edu> </div><div>Date: 11/17/17 1:05 PM (GMT-05:00) </div><div>To: ghc-devs@haskell.org </div><div>Subject: True multi stage Haskell </div><div><br></div></div>After many years of hoping someone else would do this, I would like to<br>make GHC into a true multi-stage programming language. Here is how I<br>thought I might approach this.<br><br>1) Use the GHC as a library module.<br>2) Use the LLVM backend.<br><br>I have no experience with either of these tools.<br>Lets start simple, How would I write functions like<br><br>compile :: String -> IO PtrToLLVMCode -- where the string is a small <br>Haskell program.<br>llvmCompile :: PtrToLLVMCode -> IO PtrToMachineCode<br>jumpTo:: PtrToMachineCode -> IO ans -- where ans is the "type" of the <br>string.<br><br><br>Any thoughts on how to get started? What papers to read, examples to <br>look at?<br><br>I'd love to move to some more disciplined input type, a sort of (mono) <br>typed program<br>representation (with similar complexity) to Template Haskell Exp type.<br><br>where (Exp t) is a data structure representing a Haskell program of type t.<br><br>All offers of advice accepted. I'm trying to get started soon, and good <br>advice<br>about what to avoid is especially welcome. If any one wanted to help <br>with this,<br>that would be great.<br><br>Tim Sheard<br><br>_______________________________________________<br>ghc-devs mailing list<br>ghc-devs@haskell.org<br>http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<br></body></html>