I'm new to Haskell.
I'm using ghci
. I know I can move through directory with the command :cd <dir>
. But I cannot find the command to list the files in a directory (something like Unix ls
or Microsoft dir
).
Is it possible to do it in GHCI?
Thank you
Then start up Haskell, use the :cd command to change to your home directory or subdirectory, then the :load command to load the file. Try things out. If you want to edit your file, do so and save it, and then back in Haskell reload the file using :reload.
From the command line, enter "ghci" (or "ghci -W") followed by an optional filename to load. Note: We recommend using "ghci -W", which tells GHC to output useful warning messages in more situations. These warnings help to avoid common programming errors.
Open a command window and navigate to the directory where you want to keep your Haskell source files. Run Haskell by typing ghci or ghci MyFile. hs. (The "i" in "GHCi" stands for "interactive", as opposed to compiling and producing an executable file.)
You can call bash command :!ls
.
:show paths
type :?
for help in GHCI; at the bottom, there's a Commands for displaying information
heading
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With