Using cabal repl
seems to do nothing at all when used on library projects, but works fine for executable projects. Is this expected behavior that I just don't understand?
If I have a file containing simply
go = putStrLn "test"
and use cabal init
with all the defaults (but choose "library" as the type), then running cabal repl
just produces the some text about configuring and preprocessing the library and never enters a REPL environment. The exact same steps, but with "executable" selected as the type, puts me right into GHCi as expected.
The code works fine when loaded directly into GHCi.
cabal repl
will only load it if you have it specified, but that's an untested guess. – Farfamed