Avoid re-typechecking 🚀╰(*°▽°*)╯#2389
Conversation
everything is done as late as possible, i.e. explicitly showing which steps require re-typechecking and which steps require re-desugaring.
1053cf0 to
6c840ab
Compare
6c840ab to
55455d4
Compare
facundominguez
left a comment
There was a problem hiding this comment.
Thanks @gergoerdi! Quite an achievement. I've sprinkled some questions in parts that I don't fully understand.
55455d4 to
8d45cc7
Compare
Yeah I'm quite proud of getting this to work. |
8d45cc7 to
9b43230
Compare
012b5b0 to
1d3d681
Compare
|
Net -30 lines of code, that's how you know it's the good stuff! |
just postprocess the result of normal typechecking before passing it to the desugarer. See https://gitlab.haskell.org/ghc/ghc/-/issues/24386 for some background on why we even need to do this.
module, so we just need to `unoptimise` it.
1d3d681 to
2c59a0a
Compare
2c59a0a to
d67aef7
Compare
| = def &= help "Dump pre-normalized core (before a-normalization)" | ||
| &= name "dump-pre-normalized-core" | ||
| &= explicit | ||
| , insertCoreBreakPoints |
There was a problem hiding this comment.
The flag is still mentioned in the changelog for the next release.
|
I contributed a commit to remove the boolean from the recursion in |
|
Don't know how to add comment to specific line on mobile... I think it's nicer if you use a record pattern match to take the |
a22e6fb to
e23da17
Compare
This finally solves the long-standing problem of the LH plugin running the GHC typechecker. Note that this works without requiring anything new from GHC.
I guarantee you this will be the best PR you get from me this week :P