https://github.com/cirosantilli/haskell-cheat
https://github.com/cirosantilli/haskell-cheat
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cirosantilli/haskell-cheat
- Owner: cirosantilli
- Created: 2014-08-13T12:42:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T20:24:46.000Z (about 9 years ago)
- Last Synced: 2025-01-02T05:13:48.299Z (4 months ago)
- Language: Haskell
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Haskell Cheat
Fun only to see how a pure functional language is like.
Official tutorial list:
-
Good O'Reilly published tutorial.
## Type inference
Haskell compiles, but infers the type of any expression.
This allows you not to write huge namespaced types like in C++.
This is somewhat the path that C++ is just now starting to take with features like `auto`.
## Pure
Haskell strongly encourages you to separate pure from impure code.
Pure code cannot have state. E.g., the output of a function can depend only on it's input, and the function cannot have side effects like writing to a file or setting a global variable.
This says a lot about the function. For example, if you know that a function has signature:
Bool -> Bool
Then there are only 4 possible functions:
- True constant
- False constant
- negator
- identityIn a language like C, this is of course not possible since the output of the function can depend on global variables.
## Package management
Central archive: Hackage
Function search engine: Hoogle
## GHC
## Glorious Haskell Compiler
Main compiler.
Manual: