36b6023c95fe74908106c491cdeeaa3b052c2a95
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Prelude.md
1 # Basic functions and operators
2
3 ## Booleans
4
5 ::data[Builtin/Boolean]
6 ::value[&&, ||, not, and, or, all, any, otherwise]
7
8 ## Comparison
9
10 ::class[Ord]
11 ::value[!=]
12 ::value[minimum, maximum, minimumBy, maximumBy, &<&]
13 ::value[isDigit, isFinite, isInfinite, isNaN]
14
15 ## Numeric functions
16
17 ::data[Builtin/Short, Builtin/Integer, Builtin/Long, Builtin/Float, Builtin/Double]
18 ::class[Additive, Ring, OrderedRing, Real, Integral]
19
20 # Data structures
21
22 ## Tuples
23
24 ::value[fst, snd, curry, uncurry, curry3, uncurry3, swap]
25
26 ## Maybe
27
28 ::data[Builtin/Maybe]
29 ::value[fromJust, fromMaybe, execJust, filterJust, orElse, elemMaybe]
30
31 ## Either
32
33 ::data[Either]
34 ::value[mapEither]
35
36 ## Lists
37
38 ::class[Sequence]
39 ::value[!, getList]
40 ::value[elem]
41 ::value[filter, concatMap]
42 ::value[foldl, foldl1, foldr]
43 ::value[unfoldl, unfoldr]
44 ::value[zip, zipWith, unzip]
45 ::value[sort, sortBy, sortWith]
46 ::value[index, indexBy, indexWith]
47 ::value[unique, uniqueBy]
48 ::value[tail, reverse, range, \\, deleteAllBy, for, forI, lookup, addList]
49 ::value[groupBy, intersect, findFirst]
50 ::value[singletonList]
51 ::value[group, groupWith]
52 ::value[mapFirst, mapMaybe, mapI]
53 ::value[build]
54 ::value[partition]
55 ::value[uniqueWith]
56 ::value[transpose]
57 ::value[takeWhile]
58
59 ## Strings
60
61 ::value[trim, splitString, indexOf, lastIndexOf, startsWith, endsWith, regionMatches, replaceString]
62 ::value[contains]
63 ::value[charAt]
64 ::value[isLetter, addChar, subChar]
65 ::value[intercalate]
66 ::value[string]
67 ::value[joinWithSeparator]
68 ::value[printWithSeparator]
69 ::value[split]
70
71 # Higher order programming
72
73 ## Functions
74
75 ::value[const, $, ., id, flip, ignore]
76
77 ## Functors
78
79 ::class[Functor, FunctorE]
80
81 ## Monads
82
83 ::class[Monad]
84 ::value[>>]
85 ::class[FunctorM]
86 ::value[repeatForever]
87 ::class[MonadZero]
88 ::value[guard]
89 ::class[MonadPlus, MonadOr]
90 ::value[ignoreM]
91
92 # Side-effects 
93
94 ## Mutable references
95
96 ::data[Ref]
97 ::value[ref, getRef, :=]
98
99 ## Failure
100
101 ::value[Builtin/fail]
102
103 ## Control structures
104
105 ::value[while,forN]
106
107 ## Console
108
109 ::value[print, printString, printError, printErrorsAsNormalPrints, printingToFile]
110
111 ## Progress
112
113 ::value[didWork, checkInterrupted, isInterrupted]
114
115 ## UIDs
116
117 ::value[generateUID]
118
119 # Data
120
121 ## String conversion
122
123 ::class[Show]
124 ::value[<<]
125 ::data[Par]
126 ::class[Read]
127 ::value[toLowerCase, toUpperCase]
128
129 ## Other conversions
130
131 ::value[toDoubleArray, fromDoubleArray, arrayToList, listToArray]
132
133 ## Serialization
134
135 ::data[Builtin/Binding]
136 ::class[Builtin/Serializable]
137 ::value[Builtin/binding]
138
139 ## Typeable
140
141 ::data[Builtin/Type]
142 ::class[Builtin/Typeable]
143 ::value[Builtin/typeOf]
144
145 ## Dynamic
146
147 ::data[Dynamic]
148 ::value[toDynamic, fromDynamic]
149
150 # Exception handling
151
152 ::value[catch]
153
154 # Undocumented entities
155
156 ::undocumented[]