Can I get the internal name of a package at runtime?

Brandon Allbery allbery.b at gmail.com
Sat Oct 14 20:19:32 UTC 2017


On Sat, Oct 14, 2017 at 3:59 PM, MarLinn <monkleyon at gmail.com> wrote:

> That sounds reasonable, but also like there *can not be* a way to obtain
> that hash at runtime. And therefore, no way to discover the true package
> name.
>

I can think of a hacky way: make sure the symbol table is still present in
the executable and that you can find said executable, z-encode the part of
the package+version you know and a symbol you know, and look for symbols
that start with one and end with the other; the hash will be in between.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171014/e4e358bc/attachment-0001.html>


More information about the ghc-devs mailing list