I was trying to find out, whether the Haskell environment is needed to run Haskell program? For instance like Java.
Or does it work more like .net, where compiled .exe can be run on any computer wherever one copies it to?
I got this question, because in addition to normal arguments, one can give arguments for Haskell environment (+RTS -RTS
) when launching an executable.
Asked
Active
Viewed 110 times
1

Ignas
- 389
- 2
- 13
-
The answer is "Yes". The dupe question is about how to also remove dependencies on non-Haskell shared libraries like zlib and gmp. – that other guy Apr 24 '18 at 17:41
-
4FWIW, a compiled `.exe` _cannot_ be run on any computer, only on Windows (or Wine), and particularly not when it's written with .net, which _is_ a separate runtime comparable to the JVM which just happens to be included in Windows if I recall correctly. But yeah, for a properly native-compiled language like C++ or Haskell (and indeed C#, through Mono) this is possible, as long as you stay with a given type of OS. – leftaroundabout Apr 24 '18 at 17:42
-
1@leftaroundabout wouldn't https://stackoverflow.com/questions/6389948/do-ghc-compiled-binaries-require-ghc-or-are-they-self-contained be a better dupe target? – Benjamin Hodgson Apr 25 '18 at 00:21
-
1@BenjaminHodgson I have added it to the duplicate targets list. – duplode Apr 25 '18 at 03:15