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

MarLinn monkleyon at
Sat Oct 14 19:59:03 UTC 2017

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 

Which in turn makes discovery and loading of plug-ins a bit harder. 
Well, I guess it's for a good reason so I'll have to work around it. 
Good to know.

Thanks for helping out!


On 2017-10-14 20:11, Brandon Allbery wrote:
> On Sat, Oct 14, 2017 at 12:48 PM, MarLinn <monkleyon at 
> <mailto:monkleyon at>> wrote:
>     So the "actual" package name seems to be
>     "Plugin-".
>     That leaves the random(?) characters behind the version number to
>     be explained.
> ABI hash of that specific package build, which is needed because 
> compiling with different optimization levels etc. will change what 
> part of the internals gets exposed in the .hi file for inlining into 
> other modules; mismatches there lead to *really* weird behavior. (If 
> you're lucky, it'll "just" be a type mismatch in code you didn't 
> write, because it came from the .hi file. If unlucky, it compiles but 
> dumps core at runtime.)
> -- 
> brandon s allbery kf8nh sine nomine associates
> allbery.b at <mailto:allbery.b at> 
> ballbery at <mailto:ballbery at>
> unix, openafs, kerberos, infrastructure, xmonad

More information about the ghc-devs mailing list