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/13 21:02] – 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 | ||
| Line 46: | Line 45: | ||
| * '' | * '' | ||
| - | * see the following | + | * see the following |
| * <code Haskell> | * <code Haskell> | ||
| main :: IO () | main :: IO () | ||
| Line 66: | 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 82: | 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 91: | Line 90: | ||
| ==== default package is Prelude ==== | ==== default package is Prelude ==== | ||
| - | * '' | + | * '' |
| * package '' | * package '' | ||
| * enables basic elements like functions, types, type classes, and instances | * enables basic elements like functions, types, type classes, and instances | ||
| Line 97: | Line 96: | ||
| * see also [[codesnippets: | * see also [[codesnippets: | ||
| + | |||
| + | ===== ✎ ===== | ||
| + | ~~DISCUSSION~~ | ||
codesnippets/firsthaskellprogram.1618340554.txt.gz · Last modified: (external edit)
