3

I have installed by following the instruction here http://smlnj.org/dist/working/110.96/index.html. On that page you have to choose smlnj-amd64-110.96.

I clicked on the downloaded package and clicked open which opens the an installer.

mac installer

Once this is done. I open a terminal and type sml I get zsh: command not found: sml.

If I change directory to /usr/local/smlnj/bin and run ./sml I get the sml prompt.

➜  bin ./sml               
Standard ML of New Jersey (64-bit) v110.96 [built: Fri Dec 13 14:59:34 2019]

My understanding is that adding smlnj to my path like:

export PATH=/usr/local/smlnj/bin:$PATH
// or
export PATH=${HOME}/smlnj/bin:$PATH

I should get the prompt by typing sml but instead I get: zsh: command not found: sml.

Any guidance would be greatly appreciated.

Thank you.

armand
  • 693
  • 9
  • 29

1 Answers1

2

Previously I had added the path to my ./bash_profile file. By adding it to .zshrc instead and restarting the terminal, it worked.

# SMLNJ
export PATH=/usr/local/smlnj/bin:$PATH

Then restart terminal.

Thanks.

armand
  • 693
  • 9
  • 29
  • 1
    Add it to `.zprofile`, not `.zshrc`, unless you have explicitly configured your terminal emulator to start a non-login shell instead of a login shell. – chepner Feb 12 '20 at 14:11
  • A side note since this was hectic for me. If you are using vscode as your editor you can get sml formatting with https://github.com/stonebuddha/vscode-better-sml. Be sure to add ` "[sml]": { "editor.defaultFormatter": "stonebuddha.vscode-better-sml" },` to your `settings.json` – armand Apr 18 '20 at 16:32