Ask coding questions

← Back to all posts
Automatically loading Haskell modules when clicking "Run"
maxdore (0)


in my Haskell project I would like to automatically load the main module when clicking Run, and not having to type ":l main" each time.

One way to do this is to put run = "ghci main.hs" in .replit, which does the job. However, the Console output is now more messy and much harder to read, which is a problem for the educational context in which we intend to use replit.

Is there a different way to have the normal Console load a module automatically, while still maintaining the nice colouring and clean output of the console?

Thank you.