Generally, I use VSC Code Run Code extension. I have the following command configured:
runhaskell -- -fno-max-relevant-binds -Wincomplete-patterns -isrc
Whenever I am looking at a particular Main.hs file inside my Haskell project.
However, if I need to add the line:
import System.Random
Then, I won’t be able to run it since that dependency is not available in base, I think.
I could, in principle, every time change the command to include a package, like:
runhaskell -- -fno-max-relevant-binds -Wincomplete-patterns -isrc -package=random
However, that seems to be a slow process. Some people suggested cabal repl
for trying function available in my library (src
directory), though seems slow to save, move to the terminal, reload the file, go back to the file and continue.
What’s the fastest way to quickly test haskell code haskellers here think ?
Thank you for any guidance