Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install a working version of Standard ML on Mac?

I'm using Mac OSX 10.7.5 and I can't seem to get download a working Standard ML compiler with a REPL available. Is this supposed to be so difficult? Is there a best ML that I should be downloading. I've tried SML/NJ and MLton to no avail.

like image 630
ordinary Avatar asked Sep 26 '13 09:09

ordinary


2 Answers

A Mac user can also use

$ brew install smlnj

Add path similar to /usr/local/Cellar/smlnj/110.82/libexec/bin to your .bash_profile.

$ source ~/.bash_profile

See this article for more information.

like image 176
Tai Avatar answered Sep 28 '22 02:09

Tai


I did the following:

--download appropriate(for your operating system) .dmg file from http://www.smlnj.org/dist/working/110.75/

--in your ~/.bash_profile: export PATH="$PATH:/usr/local/smlnj-110.75/bin"

--run your bash_profile by doing source .bash_profile

--go to terminal and type sml.

I personally use sml mode for emacs. Add the following to your .emacs file and make sure that sml mode is installed in your emacs from M-list-packages.

(setenv "PATH" (concat "/usr/local/smlnj-110.75/bin:" (getenv "PATH")))

(setq exec-path (cons "/usr/local/smlnj-110.75/bin" exec-path))

You can start sml REPL in emacs by doing C-c C-s.

like image 32
timmur Avatar answered Sep 28 '22 01:09

timmur