Skip to content

Commit 320b078

Browse files
committed
Retain CAFs in the interpreter
iserv-proxy-interpreter dynamically loads libraries. It must retain CAFs to avoid issues like: > iserv-proxy-interpreter.exe:internal error:Evaluated a CAF that was GC'd! ghc-lib uses a hacky keepCAFsForGHCi.c file; iserv still uses a custom hs-main C file. We use -fkeep-cafs as it has the same effect.
1 parent 6e95df7 commit 320b078

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

iserv-proxy.cabal

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ Executable iserv-proxy
9999
Executable iserv-proxy-interpreter
100100
Default-Language: Haskell2010
101101
Main-Is: Interpreter.hs
102+
-- We need to pass -fkeep-cafs to ensure that the interpreter retains CAFs
103+
-- Iserv and GHC do something similar.
104+
ghc-options: -fkeep-cafs
102105
Build-Depends: base >= 4 && < 5,
103106
iserv-proxy
104107

0 commit comments

Comments
 (0)