Find the ghc binary path from libdir

Daniel Gröber dxld at darkboxed.org
Mon Feb 8 18:48:01 UTC 2021


Hi Fendor,

On Mon, Feb 08, 2021 at 07:35:12PM +0100, Fendor wrote:
> I want to find out the location of the `ghc` (and `ghc-pkg`) executable
> given the `$libdir` (obtained by `ghc --print-libdir`).
> Is there a platform independent way of doing that, which we can rely on?

Are you aware of the `ghc --print-libdir` option? I think you'd be much
better off going from ghc binary to libdir instead of the other way around.

Could you explain why you're trying to do it your way?

> (P. S. first time using a mailing list, hope I am doing it correctly)

Seems fine to me :)

--Daniel


More information about the ghc-devs mailing list