<div>I would like to explore making a backend for .NET. I&#39;ve done a lot of background reading about previous .NET and JVM attempts for Haskell. It seems like several folks have made significant progress in the past and, with the exception of UHC, I can&#39;t find any code around the internet from the previous efforts. I realize that in total it&#39;s a huge undertaking and codegen is only one of several significant hurdles to success.</div>
<div><br></div><div><div>I would like to get a very, very, very simple translation working inside GHC. If all I can compile and run is fibonacci, then I would be quite happy. For my first attempt, proof of concept is sufficient.</div>
</div><div><br></div>I found a lot of good documentation on the ghc trac for how the compilation phases work and what happens in the different parts of the backend. The documentation is excellent, especially compared to other compilers I&#39;ve looked at.<div>
<br></div><div>When I started looking at how to write the code, I started to wonder about the &quot;least effort&quot; path to getting something (anything?) working. Here are some questions:<div>  * Haskell.NET seems to be dead. Does anyone know where their code went?</div>
<div>  * Did lambdavm also disappear? (JVM I know, but close enough to be useful)</div><div>  * Would it make sense to copy&amp;modify the -fvia-C backend to generate C#? The trac claims that ghc can compile itself to C so that only standard gnu C tools are needed to build an unregistered compiler. Could I use this trick to translate programs to C#?</div>
</div><div>  * What stage in the pipeline should I translate from? Core? STG? Cmm?</div><div>  * Which directories/source files should I look at to get familiar with the code gen? I&#39;ve heard the LLVM codegen is relatively simple.</div>
<div>  * Any other advice?</div><div><br></div><div>Thank you in advance!</div><div>Jason</div>