I'm looking for something like
$ stack whereis hasktags
where whereis
acts more or less like UNIX whereis
command. hasktags
is to be run like this:
$ stack exec -- hasktags
stack exec -- whereis hasktags
will do.
stack exec -- whereis yourprogramname
works for me on a Linux box, but I have to use stack exec -- which yourprogramname
on Mac OS X.
(which
also works on Linux, of course.)
Note that neither of these are useful for automating deployments when the executable name is the same as one on the build machine -- not likely, but not impossible.
来源:https://stackoverflow.com/questions/47852911/haskell-stack-locate-the-executable