Closed adamse closed 5 years ago
The setup file does contain the same information as ghc --info
a bit further along, which includes the GHC version (with all version components).
I see this was already discovered in https://github.com/alexwl/haskell-code-explorer/pull/33#discussion_r271672292
You are right.
I wrongly assumed that the version of GHC from the header of setup-config
is the version of GHC that was used to build the package.
It seems that this assumption may be correct when the GHC is installed by stack (because versions of GHC and Cabal are pinned), but in general, it is wrong.
I've committed the fix: 4ad872ac715e212c2c2c86e4a1a87f9c3a09ee91
Thanks for fixing it. You have built an excellent tool here!
I'm not 100% but it seems that
getPackageGhcVersion
is actually parsing out the GHC version that cabal-install/Cabal was built with, not the GHC version for the package.Here's a snippet of the
setup-config
I have: