Do ghc-compiled binaries require GHC or are they self-contained?

后端 未结 4 1088
星月不相逢
星月不相逢 2020-12-05 03:44

If a friend wants to run my Haskell binaries, does he have to first install Haskell, or can he immediately run the binary by itself?

Is the answer the same on Mac, W

4条回答
  •  再見小時候
    2020-12-05 04:43

    An installation of GHC is not required for most binaries. Some (e.g. xmonad) use Haskell as their configuration language; in those cases you will need a compiler.

    There is also a question of static vs. dynamic linking. I believe the default for now is still static linking, in which case it should be quite easy to migrate a binary from one machine to the other (just need to have the same architecture and OS).

提交回复
热议问题