Closed elldritch closed 2 years ago
I also removed some dead code given the new parser. Ignore 2b349ab when reviewing to reduce noise in the diff (link to low-noise diff). In that commit, I removed a bunch of dead code and added module export lists (to more easily identify dead code).
In general I like what you're doing here to fix this issue. Sorry about the merge conflicts. Once you rebase, would you mind adhering to the style conventions in each file and only making the necessary changes for parsing, just to keep the PR small?
I reapplied your changes here: https://github.com/dfithian/prune-juice/pull/15
Resolves #9.
I found the native
ghc-pkg
parser forInstalledPackageInfo
fromghc-pkg
's source code, and used that instead of a hand-rolled parser.It looks like the breakage in #9 is indeed caused by re-exports. When an
ExposedModule
has a re-export, it appears to use this alternate syntax. It looks like first-class re-exports were introduced for Backpack, to describe "open modules" that where many modules can provide a specific signature.