Functional teaching language for use in a discrete mathematics course
TeX
181
2,087 commits
updated Mar 24, 2026
Disco is a programming language intended to teach basic functional programming principles in the context of a discrete mathematics course.
Visit Disco Live to use Disco directly in your browser without installing anything!
Feel free to look around, ask questions, etc. You can also contribute---collaborators are most welcome.
Check out the disco IRC channel, #disco-lang on Libera.Chat. If
you're not familiar with IRC, you can connect via this web client.
Documentation is hosted on readthedocs.io.
If you'd like to contribute to disco development, check out CONTRIBUTING.md.
Scroll down to find the instructions appropriate to your operating system. Note, if you are a student using Disco for a class, you should not need these instructions! You should be able to use Disco Live in your browser.
Open a PowerShell terminal.
Run the command wsl --install.
Now type wsl to open a Windows Subsystem for Linux prompt.
Paste this command:
sudo apt install build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev pkg-config
Paste the following command:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Keep hitting Enter to accept the defaults.
Once it finishes, type the following commands:
sudo apt install zlib1g-dev
cabal update
cabal install disco
If it works, you should be able to now type disco at a command
prompt, which should display a message like this:
Welcome to Disco!
A language for programming discrete mathematics.
Disco>
See the Troubleshooting section below if you have any issues.
Open a terminal.
Paste the following command:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Keep hitting Enter to accept the defaults.
Now run the following:
cabal update
cabal install disco
If building fails with an error like ghc: could not execute: opt, it means you need to install LLVM. The easiest
way to do this is to first follow the instructions to install
Homebrew (if you don't already have it), and
then type
brew install llvm
at a terminal prompt.
If this fails with an error like Could not resolve HEAD to a revision, then try running these two commands at a
terminal prompt:
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
Then re-run the brew install llvm command.
After installing llvm, you may need to close and re-open
the terminal before running cabal install disco again.
If it works, you should be able to now type disco at a command
prompt, which should display a message like this:
Welcome to Disco!
A language for programming discrete mathematics.
Disco>
See the Troubleshooting section below if you have any issues.
If installation seems like it succeeded but the disco command is
not recognized, it may be an issue with your path environment
variable settings. Try running disco using an explicit path:
~/.cabal/bin/disco on Linux, OSX, or WSL2C:\cabal\bin\disco on Windowscabal/bin folder is on your computer, and
run disco from there.cabal/bin folder (wherever it is
located) to your Path (Windows) or PATH (Linux/OSX)
environment variable, so that you can run disco simply by typing
disco. However, this step is optional.On Windows, if disco crashes with an error about foldr after you
try to type anything (or if it simply closes the entire window when
you type anything), the problem is probably that you need to enable
UTF-8 mode.
Open a command prompt, and type
chcp 65001
Now start disco as before (by typing disco or
C:\cabal\bin\disco or whatever worked).
You will have to do this every time you run disco.
Alternatively, you can create a file called disco.cmd
containing those two commands, for example:
chcp 65001
C:\cabal\bin\disco
Now you can simply double-click on disco.cmd to run disco.
If you encounter any difficulties, please let me know --- either come talk to me or open a GitHub issue. These instructions will be kept up-to-date with whatever helpful tips or workarounds I learn. So even if you encounter a difficulty but figure out the solution youself, let me know --- that way I can include the problem and solution here so others can benefit!
TeX
46.0%
Haskell
43.9%
BibTeX Style
6.6%
Agda
3.1%
Functional teaching language for use in a discrete mathematics course
TeX
181
2,087 commits
updated Mar 24, 2026
Disco is a programming language intended to teach basic functional programming principles in the context of a discrete mathematics course.
Visit Disco Live to use Disco directly in your browser without installing anything!
Feel free to look around, ask questions, etc. You can also contribute---collaborators are most welcome.
Check out the disco IRC channel, #disco-lang on Libera.Chat. If
you're not familiar with IRC, you can connect via this web client.
Documentation is hosted on readthedocs.io.
If you'd like to contribute to disco development, check out CONTRIBUTING.md.
Scroll down to find the instructions appropriate to your operating system. Note, if you are a student using Disco for a class, you should not need these instructions! You should be able to use Disco Live in your browser.
Open a PowerShell terminal.
Run the command wsl --install.
Now type wsl to open a Windows Subsystem for Linux prompt.
Paste this command:
sudo apt install build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev pkg-config
Paste the following command:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Keep hitting Enter to accept the defaults.
Once it finishes, type the following commands:
sudo apt install zlib1g-dev
cabal update
cabal install disco
If it works, you should be able to now type disco at a command
prompt, which should display a message like this:
Welcome to Disco!
A language for programming discrete mathematics.
Disco>
See the Troubleshooting section below if you have any issues.
Open a terminal.
Paste the following command:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Keep hitting Enter to accept the defaults.
Now run the following:
cabal update
cabal install disco
If building fails with an error like ghc: could not execute: opt, it means you need to install LLVM. The easiest
way to do this is to first follow the instructions to install
Homebrew (if you don't already have it), and
then type
brew install llvm
at a terminal prompt.
If this fails with an error like Could not resolve HEAD to a revision, then try running these two commands at a
terminal prompt:
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
Then re-run the brew install llvm command.
After installing llvm, you may need to close and re-open
the terminal before running cabal install disco again.
If it works, you should be able to now type disco at a command
prompt, which should display a message like this:
Welcome to Disco!
A language for programming discrete mathematics.
Disco>
See the Troubleshooting section below if you have any issues.
If installation seems like it succeeded but the disco command is
not recognized, it may be an issue with your path environment
variable settings. Try running disco using an explicit path:
~/.cabal/bin/disco on Linux, OSX, or WSL2C:\cabal\bin\disco on Windowscabal/bin folder is on your computer, and
run disco from there.cabal/bin folder (wherever it is
located) to your Path (Windows) or PATH (Linux/OSX)
environment variable, so that you can run disco simply by typing
disco. However, this step is optional.On Windows, if disco crashes with an error about foldr after you
try to type anything (or if it simply closes the entire window when
you type anything), the problem is probably that you need to enable
UTF-8 mode.
Open a command prompt, and type
chcp 65001
Now start disco as before (by typing disco or
C:\cabal\bin\disco or whatever worked).
You will have to do this every time you run disco.
Alternatively, you can create a file called disco.cmd
containing those two commands, for example:
chcp 65001
C:\cabal\bin\disco
Now you can simply double-click on disco.cmd to run disco.
If you encounter any difficulties, please let me know --- either come talk to me or open a GitHub issue. These instructions will be kept up-to-date with whatever helpful tips or workarounds I learn. So even if you encounter a difficulty but figure out the solution youself, let me know --- that way I can include the problem and solution here so others can benefit!
TeX
46.0%
Haskell
43.9%
BibTeX Style
6.6%
Agda
3.1%