How to install SML on your Mac OSX

Kim Pham bio photo By Kim Pham

I am taking Programming Language Concepts at UWM this semester (CS 431), which covers functional programming with ML and Scala. I needed to install it on my Macbook Pro, and SML seemed old enough to have a Homebrew command. Honestly, copy & paste the commands below into the Terminal and you’ll be set! Installing SML through Homebrew is super easy!!!

Original Instructions

Have Homebrew installed

ruby <(curl -fsSk

Double-check that it’s updated if already installed

$ brew update

Install SML through Homebrew

$ brew install smlnj

Update your PATH

Open your bash profile

$ open -t ~/.bash_profile

Add an export PATH-directive to this file:

export PATH=/usr/local/Cellar/smlnj/110.74/libexec/bin:$PATH

Reload your profile

$ source ~/.bash_profile


Type sml into the Terminal to get started!

$ sml

hooray ya did it!!!