What does "cabal repl" does and how it differentiates from "cabal build"?
the documentation says:
loads all of the modules of the target into GHCi as interpreted bytecode
But I dont fully understand when do I need to use that command
In our context of smart contracts, cabal build
builds the executables needed for doing cabal run
, which we use to build the Plutus validator.
cabal repl
, in the other hand loads all the modules that are in your project into GHCi, which is ready to be used in interpreted code. In this context you can test your validator or your off-chain code in an interactive way, which is useful to test behavior of specific functions in your code.