Updated 2017-08-06 16:32:13 by pooryorick

Haskell is a polymorphicly-typed, type-safe, lazy, purely functional language.

See Also  edit

Interfacing Tcl with Haskell
Playing Haskell
Tcl and other languages
is a declarative GUI binding of Tk

Description  edit

wdb: In Haskell it is not possible to assign a value to a variable. Therefore a program runs completely side-effect free.

PYK 2017-08-05: While the term "assignment" may not make sense in the world of Haskell, variables in Haskell programs do represent values in the program. The <- operator is part of an interface between the outside world and the pure world of the Haskell program. This interface is called "Monad" and its DSL, which includes operators such as >>= blends into Haskell so that one has to squint at it right to distinguish between the "pure" program and the "operational" (monadic) program, but the side effects are there.

Notation  edit

surrounds a character
surrounds a sequence of characters, indicating a list composed of those characters in that sequence
"pair of things, each having its own type"
"pair of types"
(Tree a)
"a, which is of type Tree"
polymorphic infix operator for addition
polymorphic infix operator for concatenation
polymorphic infix operator for subtraction
(left) "maps to" (right)
infix operator for function composition
arithmetic sequence indicator
"is prepended to"
"has type"
(left) "maps from" (right)
"evaluates to", "reduces to"
"is defined as"
"empty list"
"list where each thing is a pair of a thing having type a and a thing having type b"
"list of things which are of type a"
surrounds a function to indicate that it is being used as an infix operator
lambda function.
abstract notation for a non-terminating expression. Also known as "bottonm"
| (in a type declaration)
| (in a list comprehension)

Terminology  edit

PYK 2017-08-05: Some changes to make the terminology more practical and descriptive would make Haskell easier to think about. For example, "class" and "instance" could be replaced by a single term, "interface". Instead of
class Something a where ...
instance Something Bool where ...

it could be
interface Something a where ...
interface Something for Bool where ...