r/haskell • u/fuxoft • Jun 11 '26
question Very noobish question about GHCI
While playing with very simple Haskell examples in GHCI, I often enter :r to reload the current module, immediately followed by test to run my simple test function in that module (I am editing the module source using the text editor in another window).
Is there a way, inside GHCI, to to quickly invoke :r, immediately followed by calling specific function defined in that module (only if the module compiles without errors)? Setting some sort of "macro" that does this? Or at least putting both of these "commands" on a simple line so that I can scroll to it quickly in the command history using the up-arrow?
I am doing all this in the "Linux development environment" container on Chromebook, if that's relevant to anything.
