Is there a way to have a module automatically load when cabal repl
shows the ready prompt? I'd like to shortcut the following workflow with some command line options or something equivalent for cabal repl
:
cabal repl
ghci> :m + Note.Query
... now I do stuff with functions in the Note.Query module
You can put the command :m + Note.Query
in a file called .ghci
. If there is a file called .ghci
in the current directory, then it will be run when you invoke GHCi. If there is no .ghci
file in the current directory, but there is one in your home directory, then that will be run. This allows you to have project-specific .ghci
files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With