play-haskell
play-haskell copied to clipboard
Suggestion about Core output options
Hi, I found in your backlog in TODO.txt record about additional core output options to increase its human readability.
I recommend you to use these options: -dsuppress-all -dno-suppress-type-signatures -dsuppress-uniques -dppr-case-as-let
dsuppress-all doesn't perform -dsuppress-uniques because this often makes the printout ambiguous, but I think it's not a real problem because of lexical scopes in haskell.
dno-suppress-type-signatures is needed to return type signatures, that all are suppressed by dsuppress-all
dppr-case-as-let just changes some single cases to strict let expressions.
I'm also using -dppr-cols200, but this might look bad on small screens.
Thanks! I'll put a reference to this issue in the TODO.txt file. I'm not finding time to work on the playground currently, but I hope I'll find time again later this fall.
A side-quest that could probably help with the Core Output would be help get https://github.com/bgamari/tree-sitter-ghc-core/ to the finish line.
It would also be nice if there were syntax highlighting on core output. And another cool feature (albeit more complicated) would be if you could jump into different parts of the core output by clicking in the original source file (though i have no idea the needed mapping information would come from)