-
Notifications
You must be signed in to change notification settings - Fork 8
Haskell
Henryk Paluch edited this page Nov 3, 2022
·
1 revision
How to quickly create and run Hello world in Haskell.
OS: openSUSE LEAP 15.4
Install these packages:
sudo zypper in cabal-install ghc-compiler
Create empty project using:
mkdir -p ~/projects/haskell/hello-cabal
cd ~/projects/haskell/hello-cabal
cabal init -n
To build and run invoke:
cabal run
Very important - understanding IO (Monads) - functions that have side effect:
-
https://wiki.haskell.org/Introduction_to_IO
- above link is critical to understand how to invoke more than one function from main (which most programs are supposed to do)
Copyright © Henryk Paluch. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License