NOTE: I am using Stack. When we do (say on a CentOS machine)
stack install --ghc-options='-optl-static -optl-pthread' --force-dirty --local-bin-path path-to-executable(my-project-exe)
Can the newly created my-project-exe executable run across machines (having the same OS/Architecture) just by running ./my-project-exe ?
Sorry if the question seems very basic but I want to understand this from the first principles.
What really is this haskell executable? : Is this some single file that has all the dependencies installed within it apart from basic system/OS calls?
My usecase: I have an haskell executable created on my machine for my project. What is the minimal number of installs that is required such that I can run this executable by simply copying it to another machine with the same OS? Zero number of new installs would be the best.
PS: ./my-project-exe works like a charm on the machine on which I ran stack-install command.