Automatically import useful modules in the REPL
Summary
Using the REPL is currently cumbersome: after logging into a Nix shell and launching cabal repl
, one needs to manually import all modules that one might want to use, one by one.
Steps to reproduce
- Log into a Nix shell
- Launch
cabal repl
- Try to use a function defined in some Gargantext module without fully qualifying the name (i.e. use
runCmd
, notGargantext.Database.Prelude.runCmd
)
What is the current bug behavior?
The function is not found, instead one gets error: Variable not in scope
What is the expected correct behavior?
The function is found
Possible fixes
Write a file .ghci
at the root of the project, importing the needed modules. GHCi should read and execute its content everytime it is run.