10

I am learning Elm, and need to be able to exit the elm repl. I tried exit() like python, \q like postgres, typing just exit like MySQL, even :q like Haskell. The only thing I can do is close the terminal to exit, there has to be a better way.

james-see
  • 12,210
  • 6
  • 40
  • 47
  • Elm Repl can behave strangely on some linux distros - if you're using one. For example, if you cannot clear the screen with CTRL + L or you cannot easily go back and delete, then you'll have to make a manual fix for this problem. IT is worth double checking that as well. – BenKoshy Oct 20 '19 at 03:15

2 Answers2

12

To exit the elm repl you need to type :exit. You can also use Ctrl + d, but I prefer typed commands instead of multi-key holds. I found this answer here as part of the (unofficial) getting started with elm programming guide.

adeel41
  • 3,123
  • 1
  • 29
  • 25
james-see
  • 12,210
  • 6
  • 40
  • 47
1

Just to add a little more detail, after launching the REPL in your terminal/command line, you are prompted to visit the elm-lang site for further information regarding use of the interactive shell:

To exit the REPL, you can type :exit.

You can also press ctrl-d or ctrl-c on some platforms.

-- https://elm-lang.org/0.19.0/repl

Just for future reference, Evan (Elm's creator) has created a trove of 'hints' in the elm/compiler repo.

Community
  • 1
  • 1
Peter S.
  • 131
  • 1
  • 5