no description only meoww


It turns out that cabal repl can reuse your compiled build products from a normal build to start up and run much faster. I buried the lede about this at the end of https://jade.fyi/blog/cabal-test-dev-trick/ (which, by the way, is pretty cool: you can speed up compilation of tests greatly by lying to cabal so it builds multiple packages in the project in parallel)

Really it should do this by default, but it seems like there's likely a GHC bug involved.

Anyway, invoke the repl with cabal repl yourtarget --ghc-options "-osuf dyn_o -hisuf dyn_hi" and it will do it.



someone was asking today how to get GHCi to not interpret the entire large project for the module they're working on. i debugged this and found cabal was passing every module in the ghci invocation, then dug through cabal sources to find that there's an option for not doing that!

use cabal repl --repl-no-load to start up a repl, then manually :load just the module you want (or if you want private symbols, :m + *YourModule). it will reload much much faster in a large project.