The "Unknown:"s below indicate that an entry is incomplete.
| { ... }(1) | block (grouping statements, especially when statements are not expressions) |
| indentation(1) | block (grouping statements, especially when statements are not expressions) |
| nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
| {- ... -} | commenting (nestable) |
| -- | commenting (until end of line) |
| < > <= >= | comparison |
| min / max | comparison (min / max (binary or more)) |
| compare | comparison (returns 3 values (i.e. inferior, equal or superior)) |
| {-| ... -} | documentation comment |
| -- | | documentation comment (until end of line) |
| -- ^ | documentation comment (until end of line) |
| == /= | equality / inequality (deep) |
| System.Mem.performGC | force garbage collection |
| ( ... ) | grouping expressions |
| $ ... | grouping expressions |
| case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
| [_A-Z][_a-zA-Z0-9']* | tokens (constant regexp (if different from variable identifier regexp)) |
| [_A-Z][_a-zA-Z0-9']* | tokens (type regexp (if different from variable identifier regexp)) |
| [_a-z][_a-zA-Z0-9']* | tokens (variable identifier regexp) |
| CamelCase or camelCase | tokens (what is the standard way for scrunching together multiple words) |
| = | variable assignment or declaration (declaration) |
| <- | variable assignment or declaration (declaration) |
| (a >) | partial application (in the examples below, a normal call is "f(a,b)") (give the first argument to operator ">") |
| f a | partial application (in the examples below, a normal call is "f(a,b)") (give the first argument) |
| (> a) | partial application (in the examples below, a normal call is "f(a,b)") (give the second argument to operator ">") |
| flip f b(2) | partial application (in the examples below, a normal call is "f(a,b)") (give the second argument) |
| \a b -> ... | anonymous function |
| f a b ... | function call |
| f | function call (with no parameter) |
| . | function composition |
| f para1 para2 = ... | function definition |
| no syntax needed(3) | function return value (function body is the result) |
| id | identity function |
| catch a (\exn -> ...) | exception (catching) |
| throw | exception (throwing) |
| if c then b1 else b2 | if_then_else |
| e | c = b1 | c2 = b2 | otherwise = b3(4) | if_then_else |
case val of v1 -> ... v2 -> ... _ -> ... | multiple selection (switch) |
| ; | sequence |
| end-of-line | sequence |
| >> | sequence |
| :: | annotation (or variable declaration) |
| e :: t | cast (computed conversion (calls an internal or a user-defined function)) |
| type n = t | declaration |
| data n = t | declaration |
| newtype n = t | declaration |
| constness is the default | mutability, constness (type of a constant value) |
| STRef a T | mutability, constness (type of a mutable value) |
| class | class declaration |
| instance Parent Child where ... | inheritance |
| method object para | method invocation |
| method object | method invocation (with no parameter) |
| module p where ... | declare |
| module p (name1, name2, ...) where ... | declare (selective export) |
| import p | import (everything into current namespace) |
| import p (name1, name2, ...) | import (selectively) |
| . | package scope |
| s !! n | accessing n-th character |
| chr | ascii to character |
| 'z' | character "z" |
| ord | character to ascii |
| Char | character type name |
| show | convert something to a string (see also string interpolation) |
| concat $ replicate | duplicate n times |
| (take len . drop n) s | extract a substring |
| findSubstring | locate a substring |
... "...\n\
\...\n" | multi-line |
| Data.Binary.encode | serialize (marshalling) |
| print(5) | simple print (on any objects) |
| putStr | simple print (on strings) |
| putStrLn | simple print (on strings) |
| printf | simple print (printf-like) |
| printf | sprintf-like |
| ++ | string concatenation |
| == /= | string equality & inequality |
| length | string size |
| "\n" | strings (end-of-line (without writing the real CR or LF character)) |
| "..." | strings (with no interpolation of variables) |
| String | type name |
| Data.Binary.decode | unserialize (un-marshalling) |
| toUpper / toLower | upper / lower case character |
| False | false value |
| not(6) | logical not |
| || / && | logical or / and (short circuit) |
| True | true value |
| Bool | type name |
| unzip | 2 lists from a list of couples |
| : | adding an element at the beginning (list cons) (return the new list (no side-effect)) |
| tail | all but the first element |
| foldl | f(... f(f(init, e1), e2) ..., en) |
| foldr | f(e1, f(e2, ... f(en, init) ...)) |
| find | find an element |
| head | first element |
| mapM_ | for each element do something |
| elem | is an element in the list |
| any(7) | is the predicate true for an element |
| all(7) | is the predicate true for every element |
| intercalate | join a list of strings in a string using a glue string |
| filter | keep elements (matching) |
| [ x | x <- l, p x ](8) | keep elements (matching) |
| last | last element |
| ++ | list concatenation |
| [ a, b, c ](9) | list constructor |
| concat | list flattening (one level depth) |
| zip | list of couples from 2 lists |
| length | list size |
| a !! i | list/array indexing |
| lookup | lookup an element in a association list |
| partition | partition a list: elements matching, elements non matching |
| nub | remove duplicates |
| reverse | reverse |
| minimum / maximum | smallest / biggest element |
| sort(10) | sort |
| sortBy | sort |
| break | split a list (in 2 based on a predicate) |
| span | split a list (in 2 based on a predicate) |
| group | split a list (into a list of lists of same value) |
| groupBy | split a list (into sublists based on a predicate) |
| map | transform a list (or bag) in another one |
| [ f x | x <- l ](8) | transform a list (or bag) in another one |
| zipWith | transform two lists in parallel |
| [a] | type name |
| lookup | dictionary (access: read) |
| insert | dictionary (access: write) |
| fromList | dictionary (constructor) |
| member | dictionary (has the key ?) |
| keys | dictionary (list of keys) |
| elems | dictionary (list of values) |
| union(11) | dictionary (merge) |
| delete | dictionary (remove by key) |
| Data.Map, Data.HashTable | dictionary (type name) |
| data Typ = N1 | N2 | ... | enumerated type declaration |
| Nothing | optional value (null value) |
| Maybe | optional value (type name) |
| Just v | optional value (value) |
| [ a .. b ] | range (inclusive .. inclusive) |
| field r | record (selector) |
| normal function call | record (selector) |
| data Typ = N0 { n1, n2 :: typ1, n3 :: typ3, ... } | record (type declaration) |
| writeSTRef | reference (pointer) (assigning (when dereferencing doesn't give a lvalue)) |
| newSTRef | reference (pointer) (creation) |
| readSTRef | reference (pointer) (dereference) |
| ( a, b, c ) | tuple constructor |
| (typ1, ..., typn) | tuple type |
| data Typ = N1 typ1 | N2 typ2 | ... | union type declaration |
Unknown:
optional value (null coalescing)
| + / - / * / / | addition / subtraction / multiplication / division |
| .&. / .|. / xor(12) | bitwise operators (and / or / xor) |
| complement | bitwise operators (bitwise inversion) |
| shiftL / / shiftR | bitwise operators (left shift / right shift / unsigned right shift) |
| divMod | euclidean division (both quotient and modulo) |
| **, ^ and ^^(13) | exponentiation (power) |
| logBase 10 | logarithm (base 10) |
| log 10 | logarithm (base e) |
| rem | modulo (modulo of -3 / 2 is -1) |
| mod | modulo (modulo of -3 / 2 is 1) |
| - | negation |
| 1000.0, 1.0E3 | numbers syntax (floating point) |
| 0o7, 0xf | numbers syntax (integers in base 2, octal and hexadecimal) |
| 1000 | numbers syntax (integers) |
| mathematical | operator priorities and associativities (addition vs multiplication) |
| mathematical | operator priorities and associativities (exponentiation vs negation (is -3^2 equal to 9 or -9)) |
| randomR | random (random number) |
| mkStdGen | random (seed the pseudo random generator) |
| sqrt / exp / abs | square root / e-exponential / absolute value |
| sin / cos / tan | trigonometry (basic) |
| asin / acos / atan(14) | trigonometry (inverse) |
| truncate / round / floor / ceiling | truncate / round / floor / ceil |
| Float, Double, Ratio | type name (floating point) |
| Int, Integer, Int8, Int16, Int32, Int64 | type name (integers) |
