
20 Jun
2012
20 Jun
'12
10:28 a.m.
Hi Heinrich,
On Wed, Jun 20, 2012 at 2:02 AM, Heinrich Apfelmus
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