play-haskell
play-haskell copied to clipboard
Feature Request: Display Intermediary Compiler Representations in Haskell Playground
Feature Description:
Add the ability to display intermediary compiler representations within the Haskell Playground. This should include stages like parsing, renaming, type-checking, Core representation, STG representation, Cmm and LLVM representation, among others.
Rationale:
This feature will enhance user learning and debugging experiences by providing insights into how Haskell code is processed, optimized, and transformed into an executable program.
Use Case:
Users debugging or trying to understand complex code can utilize these representations to eventually understand the origin of unexpected behaviors. Additionally, it will act as a useful learning tool for those studying compiler design or Haskell internals.
References:
GHC compiler flags for dumping to stdout various intermediary representations documentation
I've also opened an issue here https://github.com/compiler-explorer/compiler-explorer/issues/5133, as perhaps providing all level of GHC internals isn't the primary purpose of https://play.haskell.org, but it should certainly be one of the purpose of https://godbolt.org!