Search code examples
zshsmlsmlnjmacos-catalina

How do you setup StandardML on MacOS Catalina


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.


Solution

  • 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.