Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save katychuang/6891014 to your computer and use it in GitHub Desktop.

Select an option

Save katychuang/6891014 to your computer and use it in GitHub Desktop.
Files for Getting Started with Haskell
# A list of common commands
# Finding out version of Haskell Compiler
ghc --version
# List packages installed
# GHC Package manager
ghc-pkg
# Unregister packages
# blow away packages
rm -fr ~/.ghc
# Caball installation location
~/.cabal/bin
#Install Haskell Platform
#Go here: http://www.haskell.org/platform/
#Ubuntu: sudo apt-get install haskell-platform
Update cabal
cabal update
sudo cabal install —global Cabal cabal-install
cabal —version
# Should show 1.18 or higher
# Might need to restart terminal
# Set up your project
mkdir helloworld
cabal init
# Answer the questions - the default answers are fine
# When prompted to choose ‘library’ or ‘executable’, choose executable
# Add this line to the end of the resulting .cabal file, under the ‘executable’ section
# main-is: Main.hs
cabal sandbox init
# Create this file Main.hs
# main = putStrLn "Hello, world!"
cabal install
run
cabal install
cabal repl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment