[GHC] #10279: panic on haskell-src-exts
GHC
ghc-devs at haskell.org
Mon Oct 19 19:32:51 UTC 2015
#10279: panic on haskell-src-exts
-------------------------------------+-------------------------------------
Reporter: throwaway123 | Owner: ezyang
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1342
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ezyang):
Right. So the extended fix suggested by this ticket is a little out of
date because of another renaming which is coming soon for GHC 8.0. The
main change was "package key" turned into "unit id", and "installed
package id" turned into "component id". The main semantic change was that
installed package ids don't identify packages anymore; they identify
components (usually the library component, but there are other components
in a package too); and the main reason we moved away from the "package"
nomenclature is laid out in #10622.
So, as far as this ticket is concerned, the easy way to fix it is to just
take anywhere you see "Package" and rename it to "Unit" (and "PkgKey" to
"UnitId".) There is one little unfortunate thing, which is instead of the
"Package" we have "Unit", which might be slightly confusing for users
(it's not to be confused with `()`) but I can't think of a good
alternative.
OK, more on the ticket comments:
> Hm, we may have lost the package version part, if it's not included in
package id strings. I will check this.
It doesn't matter, the name and the version is reported from the installed
package (unit) database. We don't extract it out from the UnitId. The
UnitId is opaque! So we're querying against the DATABASE.
> If we could provide a way to generate readable strings with version
numbers from current package ids, then that would solve the problem. But
I'm not sure if version numbers are included in package ids.
With new Cabal, UnitId should be readable by default.
> I believe we can even hide PkgKey type completely, just provide Package
to users.
That's a possibility, but I think it makes sense to keep them decoupled,
so users can synthesize UnitIds (PkgKeys).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10279#comment:34>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list