IdrisExtSTGCodegen
ghc-whole-program-compiler-project
Our great sponsors
IdrisExtSTGCodegen | ghc-whole-program-compiler-project | |
---|---|---|
6 | 9 | |
20 | 97 | |
- | - | |
5.1 | 0.0 | |
7 months ago | 7 days ago | |
Idris | Haskell | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
IdrisExtSTGCodegen
-
is dependent haskell still a thing?
In practice we will probably have an STG backend for Idris2 before a dependent Haskell, then at least you could link together Haskell and Idris code
-
What are you hyped about today?
I write an Idris2 backend which compiles to STG, yesterday we achieved to run the HelloWorld using functions from GHC.Base :) https://github.com/andorp/IdrisExtSTGCodegen/commit/0150510a7d6160806a85d799768d39f9acc65d30#diff-a15cf9e0e0625f8260bb7b91a4f4ca8e4f4558acf37d4cc834acd2e8a4cdf89aR6
-
Transpiling to GHC Core language
There is a WIP Idris2 to Ext-STG compiler: https://github.com/andorp/IdrisExtSTGCodegen
-
BOB 2021 Andor Penzes - STG Backend for Idris2
Ah, the repo also has the slides of the talk, which are a nice first step to video-less content.
The github repo describes the project as "Pre-alpha, compiles a HelloWorld".
-
Next-gen Haskell Compilation Techniques
| The Idris language versions have always supported easy and modular code generation. I am working on the Idris-ExtSTG backend closely collaborating with Csaba. The progress can be followed here: https://github.com/andorp/IdrisExtSTGCodegen . I am going to give a talk about my experiences at BobKonf 2021: https://bobkonf.de/2021/penzes.html
ghc-whole-program-compiler-project
-
Can GHCi be run like PDB?
Another thing you can try is the ghc-wpc project which has an interpreter which supports breakpoints, though you may need to hack little a bit to achieve your goals.
-
Haskell compiled onto LLVM increase performance?
Here the goal is to build a high level, easy to understand model for all GHC backend features. Validations is also required. Once we know the semantics of GHC primops and RTS features then it becomes possible to figure out how to compile Haskell programs to GRIN. I started the GHC-WPC project for this reason. GHC-WPC exports the STG intermediate representation for the whole Haskell program, and I wrote an STG interpreter from scratch in Haskell that can run any Haskell program. (i.e. GHC itself) The STG interpreter is the high level model for the GHC primop and RTS semantics. It implements all these in pure Haskell, it does not depend on GHC RTS at all.
-
Why is the debugger so bad in Haskell? (or is it just me)
I can easily debug any Haskell program with the external STG interpreter. https://www.youtube.com/watch?v=DkDUEd3pUyM https://github.com/grin-compiler/ghc-whole-program-compiler-project
-
What are you hyped about today?
I haven't gotten my hands dirty yet, but really excited hearing GHC-WPC is going on!
-
GHC Pluggable Backend?
Why didn't you mention GHC-WPC? It is also a backend sample. It exports enough information (STG + linker opts + c bits) to interpret the program or to generate a binary executable via the regular GHC codegen system. https://github.com/grin-compiler/ghc-whole-program-compiler-project
-
Transpiling to GHC Core language
You could use the GHC codegen and RTS via the external STG IR. https://github.com/grin-compiler/ghc-whole-program-compiler-project
-
Next-gen Haskell Compilation Techniques
Remarks: 1. Strict functional languages can be expressed in STG without overhead, because STG has explicit liftedness control. In a strict language every data is unlifted or unboxed. 2. Supporting all GHC primops is not unrealistic. See the primop implementation in the external STG interpreter source code. Here is the implementation of the threading primops.
What are some alternatives?
haskell.nix - Alternative Haskell Infrastructure for Nixpkgs
hs-foreign-emscripten - INTERCEPT GHCJS CCALL DISPATCH TO EMSCRIPTEN
Idris2 - A purely functional programming language with first class types
manual-stg-experiment - Manually constructed STG programs compiled with the standard GHC codegen backend.
ghc-dump - A GHC plugin and library for analysing GHC Core
grin - GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.
tcplugins-zurihac2020 - ZuriHac 2020 GHC typechecker plugins project
fused-effects-system - Profiling for Haskell programs without recompiling, via fused-effects.
normalization-bench - Lambda normalization and conversion checking benchmarks for various implementations
penrose - Haskell to JavaScript compiler, based on GHC