codesnippets:firsthaskellprogram
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| codesnippets:firsthaskellprogram [2021/04/10 19:28] – f2b216 | codesnippets:firsthaskellprogram [2025/10/08 00:48] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== First Haskell programs ====== | ====== First Haskell programs ====== | ||
| - | ~~DISCUSSION~~ | ||
| * main function with output, as a complete code example | * main function with output, as a complete code example | ||
| - | * which compiles | + | * compiles, error and warning free, with compiler: GHC 8.10.4, using compiler option |
| - | * warning free with | + | |
| - | * compiler: GHC 8.10.4 using -Wall | + | |
| * <code Haskell> | * <code Haskell> | ||
| main :: IO () | main :: IO () | ||
| Line 48: | Line 45: | ||
| * '' | * '' | ||
| - | * see the following | + | * see the following |
| * <code Haskell> | * <code Haskell> | ||
| main :: IO () | main :: IO () | ||
| Line 68: | Line 65: | ||
| * result type: '' | * result type: '' | ||
| * '' | * '' | ||
| - | * result type: '' | + | * result type: '' |
| * '' | * '' | ||
| * result type: '' | * result type: '' | ||
| * '' | * '' | ||
| - | * result type: '' | + | * result type: '' |
| * NOTE: | * NOTE: | ||
| * Types start always with upper case letters. | * Types start always with upper case letters. | ||
| Line 84: | Line 81: | ||
| ==== second line declares that function '' | ==== second line declares that function '' | ||
| - | * expression '' | + | * expression '' |
| * it binds '' | * it binds '' | ||
| * when function '' | * when function '' | ||
| - | * expression '' | + | * expression '' |
| * it binds '' | * it binds '' | ||
| * when function '' | * when function '' | ||
| Line 99: | Line 96: | ||
| * see also [[codesnippets: | * see also [[codesnippets: | ||
| + | |||
| + | ===== ✎ ===== | ||
| + | ~~DISCUSSION~~ | ||
codesnippets/firsthaskellprogram.1618075738.txt.gz · Last modified: (external edit)
