From cde3f6540878d4559bd2daa1b759d2191d23ff55 Mon Sep 17 00:00:00 2001 From: lazyLambda Date: Wed, 29 Jul 2026 22:30:58 -0400 Subject: [PATCH] Enable cabal multi-repl in skeleton Re-enable multi-repl: True in skeleton/cabal.project. The prior disable comment blamed a GHC 9.14 "LinkInMemory" panic; the real trigger is buildable unit files with no exposed-modules of their own (only reexported-modules or similar). GHC's multi-repl driver routes empty units through Pipeline.hs's LinkInMemory path even when the interpreter is enabled, and panics. See GHC issues #25366 and #26073. frontend-wasm and frontend-js were the offenders: both only reexport Frontend, no own exposed-modules. Added a one-line Placeholder module + hs-source-dirs to each so the unit files have at least one target. cabal repl --enable-multi-repl now loads 20 modules across common + frontend + backend + landing-page + frontend-wasm in one GHCi session on GHC 9.14.1. --- skeleton/cabal.project | 4 ++-- skeleton/frontend/js/frontend-js.cabal | 6 ++++++ skeleton/frontend/js/src/FrontendJs/Placeholder.hs | 1 + skeleton/frontend/wasm/frontend-wasm.cabal | 8 ++++++++ skeleton/frontend/wasm/src/FrontendWasm/Placeholder.hs | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 skeleton/frontend/js/src/FrontendJs/Placeholder.hs create mode 100644 skeleton/frontend/wasm/src/FrontendWasm/Placeholder.hs diff --git a/skeleton/cabal.project b/skeleton/cabal.project index b32cb6de2..936c3dc90 100644 --- a/skeleton/cabal.project +++ b/skeleton/cabal.project @@ -24,8 +24,8 @@ if !(arch(javascript) || arch(wasm32)) --optional-packages: -- deps/jenga/deps/reflex-dom/* --- multi-repl: True --- Disabled: GHC 9.14 multi-unit GHCi panics with "LinkInMemory". +multi-repl: True +-- Re-enabled to investigate the LinkInMemory panic prior turns noted. diff --git a/skeleton/frontend/js/frontend-js.cabal b/skeleton/frontend/js/frontend-js.cabal index 162cdcd7d..17b96dee2 100644 --- a/skeleton/frontend/js/frontend-js.cabal +++ b/skeleton/frontend/js/frontend-js.cabal @@ -49,12 +49,18 @@ custom-setup jenga-setup library + hs-source-dirs: src build-depends: base -- , frontend reexported-modules: Frontend + -- Placeholder module: workaround for GHC #25366 / #26073. + -- cabal repl --enable-multi-repl panics ("LinkInMemory") on units + -- with no exposed-modules of their own. + exposed-modules: FrontendJs.Placeholder + default-language: Haskell2010 if (arch(javascript) || arch(wasm32)) diff --git a/skeleton/frontend/js/src/FrontendJs/Placeholder.hs b/skeleton/frontend/js/src/FrontendJs/Placeholder.hs new file mode 100644 index 000000000..84442d092 --- /dev/null +++ b/skeleton/frontend/js/src/FrontendJs/Placeholder.hs @@ -0,0 +1 @@ +module FrontendJs.Placeholder where diff --git a/skeleton/frontend/wasm/frontend-wasm.cabal b/skeleton/frontend/wasm/frontend-wasm.cabal index 46879b19c..526523e69 100644 --- a/skeleton/frontend/wasm/frontend-wasm.cabal +++ b/skeleton/frontend/wasm/frontend-wasm.cabal @@ -49,12 +49,20 @@ custom-setup jenga-setup library + hs-source-dirs: src build-depends: base -- , frontend reexported-modules: Frontend + -- Placeholder module: workaround for GHC #25366 / #26073. + -- cabal repl --enable-multi-repl panics ("LinkInMemory") on units + -- with no exposed-modules of their own. See: + -- https://gitlab.haskell.org/ghc/ghc/-/issues/25366 + -- https://gitlab.haskell.org/ghc/ghc/-/issues/26073 + exposed-modules: FrontendWasm.Placeholder + default-language: Haskell2010 if (arch(javascript) || arch(wasm32)) diff --git a/skeleton/frontend/wasm/src/FrontendWasm/Placeholder.hs b/skeleton/frontend/wasm/src/FrontendWasm/Placeholder.hs new file mode 100644 index 000000000..b3f1ed9fc --- /dev/null +++ b/skeleton/frontend/wasm/src/FrontendWasm/Placeholder.hs @@ -0,0 +1 @@ +module FrontendWasm.Placeholder where