How can you preload a module when calling `cabal repl`?

Is there a way to automatically load a module when it cabal replshows a cooking invitation? I would like to shorten 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
+4
source share
1 answer

You can put the command :m + Note.Queryin a file with the name .ghci. If there is a file with a name in the current directory .ghci, it will be launched when GHCi is called. If there is no file in the current directory .ghci, but there is one in your home directory, it will be launched. This allows you to create files .ghcifor the project.

+7
source

Source: https://habr.com/ru/post/1543084/


All Articles