Proposal: Add getFullProgName

Johan Tibell johan.tibell at gmail.com
Wed Jun 20 16:28:01 CEST 2012


Hi Heinrich,

On Wed, Jun 20, 2012 at 2:02 AM, Heinrich Apfelmus
<apfelmus at quantentunnel.de> wrote:
> The only trouble I have is that these semantics don't seem to be useful.
>  For what purpose would you like to know the executable path? The only use
> case that I have encountered is to find data files relative to the program,
> but in this case, I need it to work equally well in GHCi, runghc and
> compiled.

The most common use case I can think of is having the binary invoke
itself in some way e.g. using execv. The particular use case I have in
mind is having the binary copy itself elsewhere (i.e. to another
machine) and then execute itself again.

-- Johan



More information about the Libraries mailing list