The command (in GHCi)
:load abc
Loads the functions in the file abc (which must exist in the current directory path). How would I load all
Presumably you mean Haskell source files, because you can't use the :load
command in GHCi for anything else.
At the top of the source file that you load, include the line:
import NecessaryModule
For each of the source files, make sure to name the modules, e.g.,
module NecessaryModule where
should appear. GHCi will automatically link all the files.
If you're trying to import data, take a look at System.Directory
in the documentation.