ghc-whole-program-compiler-project VS DocTest

Compare ghc-whole-program-compiler-project vs DocTest and see what are their differences.

ghc-whole-program-compiler-project

GHC Whole Program Compiler and External STG IR tooling (by grin-compiler)

DocTest

An implementation of Python's doctest for Haskell (by sol)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
ghc-whole-program-compiler-project DocTest
9 3
115 369
1.7% -
8.8 5.4
6 months ago 6 months ago
Haskell Haskell
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

ghc-whole-program-compiler-project

Posts with mentions or reviews of ghc-whole-program-compiler-project. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-06.
  • Can GHCi be run like PDB?
    3 projects | /r/haskell | 6 Jan 2023
    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.
  • ELI5: Why does the new Javascript backend need to live in GHC instead of consuming GHC-WPC output?
    1 project | /r/haskell | 20 Dec 2022
    If I understand the new GHCJS backend correctly, it diverges from the normal compilation pipeline at STG (see the new StgToJS module subtree). Wouldn't that make it an excellent candidate to use GHC-WPC's machine-readable external STG representation, instead of hooking it directly into the GHC source tree?
  • Haskell compiled onto LLVM increase performance?
    4 projects | /r/haskell | 2 Nov 2021
    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)
    3 projects | /r/haskell | 19 Oct 2021
    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
  • Haskell program inspector tooling development
    1 project | /r/haskell | 23 Jul 2021
    Hello, I'm using the external STG interpreter to observe the runtime behaviour of Haskell programs. Lately I've added an initial call-graph construction feature that I plan to refine further. https://twitter.com/csaba_hruska/status/1417486380536582151 Is there anyone who has dynamic analysis related research ambitions and wants to study Haskell program runtime behaviour in detail? If so then it would be great to talk.
  • What are you hyped about today?
    2 projects | /r/haskell | 15 May 2021
    I haven't gotten my hands dirty yet, but really excited hearing GHC-WPC is going on!
  • GHC Pluggable Backend?
    4 projects | /r/haskell | 4 May 2021
    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
    4 projects | /r/haskell | 30 Apr 2021
    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
    4 projects | /r/haskell | 10 Jan 2021
    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.

DocTest

Posts with mentions or reviews of DocTest. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-15.
  • HSpec, Tasty, sydtest, Hunit, ... -> what do you use for writing Haskell tests?
    2 projects | /r/haskell | 15 Jan 2023
    doctest for testing examples in the documentation. Docs are much clearer when they contain usage examples and doctest helps them keep up to date.
  • Why is the debugger so bad in Haskell? (or is it just me)
    3 projects | /r/haskell | 19 Oct 2021
    Try to restrict your types even on sub functions (inside where), use testing, break down your code to the most atomic parts, using ghci to debug each part once at a time, and because Haskell doesn't let you reuse variables, or mutate state, it's a lot easier to rationalize evaluation order (which makes it a lot easier to debug without step debuggers compared to languages like python).
  • Documentation or lack thereof?
    1 project | /r/ExperiencedDevs | 25 Jun 2021
    Some may argue that the tests are a form of documentation, and that's true, but they still don't capture the why. And tests are almost always separated from the actual code, which makes it more complicated to look at the code and the tests at the same time and understand them together. I've used doctest with Haskell which is a solution to this. Doctest is nice at first but in my experience it wasn't reasonable to do non-trivial tests in doctest, and plenty of tests are non-trivial. So then you're left with the decision to use doctest where you can, and another test solution for non-trivial tests, or just do all tests using the other testing solution. We chose simplicity and got rid of doctest.

What are some alternatives?

When comparing ghc-whole-program-compiler-project and DocTest you can also consider the following projects:

haskell.nix - Alternative Haskell Infrastructure for Nixpkgs

tasty - Modern and extensible testing framework for Haskell

IdrisExtSTGCodegen

quicktest

hs-foreign-emscripten - INTERCEPT GHCJS CCALL DISPATCH TO EMSCRIPTEN

http-test - Tests for HTTP APIs

grin - GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.

fitspec - refine properties for testing Haskell programs

ghc-dump - A GHC plugin and library for analysing GHC Core

test-fixture - Testing with monadic side-effects

ghc-wpc - GHC-WPC is an extended GHC that exports the STG and other IR (.modpak) for the compiled modules and linker metadata (.ghc_stgapp) at application link time.

bdd - A domain-specific language for testing programs using Behavior-Driven Development (BDD) process in Haskell