google / hrepl

Interactive development for Bazel/Haskell rules
Apache License 2.0
47 stars 10 forks source link

Support statically-linked GHC #7

Open judah opened 4 years ago

judah commented 4 years ago

Currently hrepl assumes GHC is dynamically linked and that ghci will load dynamic libraries. Quoting https://github.com/tweag/rules_haskell/pull/1210#discussion_r365739184, there are two situations where this is relevant:

  1. A static-mode GHC toolchain (e.g. on Windows) where Haskell libraries are only compiled to static archives. GHCi can load these, provided they are built with -fPIC (and -fexternal-dynamic-refs on Unix).
  2. A C library dependency that only provides a pic_static_library. GHCi's loader can usually load these.