haskell - is it possible to make program aliases in `stack exec`? -
i have project has many small executable targets. takes quite lot of time whenever source code changes due problem cannot avoid building every executables in project.
so instead i'm trying have 1 single executable decides own behavior checking name (perhaps using getprogname
): example, can build single executable name foo
, , 2 soft links targeting @ it, 1 called proga
, progb
: want behave there 3 separated programs:
foo [proga|progb]
print messages when arguments missing, or run if it'sproga
orprogb
iffoo
equal either of themproga
&progb
: if there separated binaries
as don't want project executables exposed globally, stack build && stack exec -- <progname> [...args]
. question is: possible have 1 single executable (namely foo
in example) in .cabal
file, while stack under hood make available stack exec -- proga
, stack exec -- progb
?
i know , parse path
environment in stack exec
runs, , make soft links accordingly there, i'll prefer less hacky method.
Comments
Post a Comment