Repl.it

Notes on specific issues using replit.com.

Initial Configuration

Problem: In Fall 2021, the default “run” command in a Haskell repl runs out of disk space.

Quick fix: clone this Haskell starter repl.

Details of the fix: Choose the “Show config files” option in the file browser pane.

Edit the now-visible .replit file so the contents are:

language = "haskell"
run = "ghci src/Main.hs" 
# run = "ghci src/Main.hs -e main" # runs and quits

ReplIt requires a main method

The particular interpreter repl.it requires that you have a main method. Write a simple one and then type your tests in the interactions pane.

main = do putStrLn "Loaded"

Repl.it needs variables

No “top-level” statements are allowed, everything must be assigned to a variable or in a function.

Example: [0..100] on a line by itself should be written question1 = [0..100].