git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update docs
commite0e5169654d7cf6e830f28f1d7c24dad7fb12f5c authorPhil Freeman <paf31@cantab.net> dateThu 3 Apr 2014, 14:17 (13 years ago) parente32f2c3
8 files changed+79−522
docs/source/ffi.rst+16−7 docs/source/intro.rst+13−15 docs/source/modules.rst+16−1 docs/source/prelude.rst−260 docs/source/syntax.rst+25−2 docs/source/typeclasses.rst+3−3 docs/source/types.rst+6−7 prelude/README.md−227
docs/source/ffi.rst+16−7
@@ -4,7 +4,7 @@ Foreign Function Interface
44Importing Values
55----------------
66
7−The `foreign import` keyword declares a value which is defined in Javascript, and its type::
7+The ``foreign import`` keywords declare a value which is defined in Javascript, and its type::
88
99 foreign import pow :: Number -> Number -> Number
1010
@@ -13,19 +13,28 @@ Inline Javascript
1313
1414A foreign import declaration may optionally contain its definition in Javascript as a string literal. If this is provided, the string will be inserted directly into the generated Javascript before the current module definition::
1515
16− foreign import pow "function pow(n) {\
17− \ return function(p) {\
18− \ return Math.pow(n, p);\
19− \ };\
20− \}" :: Number -> Number -> Number
16+ foreign import pow
17+ "function pow(n) {\
18+ \ return function(p) {\
19+ \ return Math.pow(n, p);\
20+ \ };\
21+ \}" :: Number -> Number -> Number
2122
2223Importing Types
2324---------------
2425
25−To declare a new type with no constructors, use `foreign import data` and provide the kind::
26+To declare a new type with no constructors, use ``foreign import data`` and provide the kind::
2627
2728 foreign import data DOM :: *
2829
2930 foreign import document :: {
3031 createElement :: String -> DOM
3132 }
33+
34+Importing Type Class Instances
35+------------------------------
36+
37+Type class instances can be imported with ``foreign import instance``::
38+
39+ foreign import instance showString :: Prelude.Show String
40+
docs/source/intro.rst+13−15
@@ -14,7 +14,7 @@ PureScript is a small strongly, statically typed compile-to-JS language with a n
1414- Modules
1515- Rank N Types
1616- Do Notation
17−- Optional tail-call elimination
17+- Tail-call elimination
1818- Type Classes
1919
2020Installation
@@ -44,12 +44,15 @@ The following options are supported:
4444--output Write the generated Javascript to the specified file
4545--externs Write a list of foreign imports declarations to the specified file in addition to generating Javascript output
4646--runtime-type-checks Generate simple runtime type checks for function arguments with simple types.
47−--tco Perform tail-call elimination on the generated Javascript.
47+--no-tco Turn off tail-call elimination.
4848--no-prelude Do not include the Prelude in the generated Javascript.
49−--magic-do Overload the `do` keyword to inline calls to `bind` for the `Eff` monad, to generate more efficient code.
49+--no-magic-do Turn off optimizations which inline calls to `>>=` for the `Eff` monad.
50+--no-opts Disable all optimizations.
5051--main Generate a call to `main` in the specified module after all other generated Javascript. Defaults to `Main` if the option is used but no value is provided.
5152--module If specified, any code which is not referenced transitively from this module will be removed. This argument can be used multiple times.
53+--codegen A list of modules for which Javascript and externs should be generated. This argument can be used multiple times.
5254--browser-namespace Specify the namespace that PureScript modules will be exported to when running in the browser.
55+--verbose-errors Generate verbose error messages
5356
5457Motivation
5558----------
@@ -98,23 +101,19 @@ The following code defines a `Person` data type and a function to generate a str
98101
99102 data Person = Person { name :: String, age :: Number }
100103
101− foreign import numberToString :: Number -> String
102−
103104 showPerson :: Person -> String
104− showPerson (Person o) = o.name ++ ", aged " ++ numberToString(o.age)
105+ showPerson (Person o) = o.name ++ ", aged " ++ show o.age
105106
106107 examplePerson :: Person
107− examplePerson = Person {name: "Bonnie", age: 26}
108−
108+ examplePerson = Person { name: "Bonnie", age: 26 }
109109
110110Line by line, this reads as follows:
111111
112−- `Person` is a data type with one constructor, also called `Person`
113−- The `Person` constructor takes an object with two properties, `name` which is a `String`, and `age` which is a `Number`
114−- The `numberToString` function is written in Javascript, and converts a `Number` to its `String` representation
115−- The `showPerson` function takes a `Person` and returns a `String`
116−- `showPerson` works by case analysis on its argument, first matching the constructor `Person` and then using string concatenation and object accessors to return its result.
117−- `examplePerson` is a Person object, made with the Person constructor and given the String "Bonnie" for the name value and the Number 26 for the age value.
112+- ``Person`` is a data type with one constructor, also called ``Person``
113+- The ``Person`` constructor takes an object with two properties, ``name`` which is a ``String``, and ``age`` which is a ``Number``
114+- The ``showPerson`` function takes a ``Person`` and returns a ``String``
115+- ``showPerson`` works by case analysis on its argument, first matching the constructor ``Person`` and then using string concatenation and object accessors to return its result.
116+- ``examplePerson`` is a Person object, made with the ``Person`` constructor and given the String "Bonnie" for the name value and the Number 26 for the age value.
118117
119118The generated Javascript looks like this::
120119
@@ -131,7 +130,6 @@ The generated Javascript looks like this::
131130 age: 26
132131 });
133132
134−
135133Related Projects
136134----------------
137135
docs/source/modules.rst+16−1
@@ -26,4 +26,19 @@ Alternatively, a list of names to import can be provided in parentheses::
2626
2727 module B where
2828
29− import A (id)
29+ import A (runFoo)
30+
31+Values, type constructors and data constructors can all be explicitly imported. A type constructor should be followed by a list of associated data constructors to import in parentheses. A double dot (``..``) can be used to import all data constructors for a given type constructor::
32+
33+ module B where
34+
35+ import A (runFoo, Foo(..), Bar(Bar))
36+
37+Module Exports
38+--------------
39+
40+Module exports can be restricted to a set of names by providing that set in parentheses in the module declaration::
41+
42+ module A (runFoo, Foo(..)) where
43+
44+The types of names which can be exported is the same as for module imports.
docs/source/prelude.rst−260
@@ -7,207 +7,21 @@ Module Prelude
77Types
88~~~~~
99
10−::
11−
12− data Ordering where
13− LT :: Ordering
14− GT :: Ordering
15− EQ :: Ordering
16−
1710Type Classes
1811~~~~~~~~~~~~
1912
20−::
21−
22− class Alternative f where
23− empty :: forall a. f a
24− (<|>) :: forall a. f a -> f a -> f a
25−
26− class Applicative f where
27− pure :: forall a. a -> f a
28− (<*>) :: forall a b. f (a -> b) -> f a -> f b
29−
30− class Bits b where
31− (&) :: b -> b -> b
32− (|) :: b -> b -> b
33− (^) :: b -> b -> b
34− shl :: b -> Prim.Number -> b
35− shr :: b -> Prim.Number -> b
36− zshr :: b -> Prim.Number -> b
37− complement :: b -> b
38−
39− class BoolLike b where
40− (&&) :: b -> b -> b
41− (||) :: b -> b -> b
42− not :: b -> b
43−
44− class Category a where
45− id :: forall t. a t t
46− (<<<) :: forall b c d. a c d -> a b c -> a b d
47−
48− class Eq a where
49− (==) :: a -> a -> Prim.Boolean
50− (/=) :: a -> a -> Prim.Boolean
51−
52− class Functor f where
53− (<$>) :: forall a b. (a -> b) -> f a -> f b
54−
55− class Monad m where
56− return :: forall a. a -> m a
57− (>>=) :: forall a b. m a -> (a -> m b) -> m b
58−
59− class Num a where
60− (+) :: a -> a -> a
61− (-) :: a -> a -> a
62− (*) :: a -> a -> a
63− (/) :: a -> a -> a
64− (%) :: a -> a -> a
65− negate :: a -> a
66−
67− class Ord a where
68− compare :: a -> a -> Ordering
69−
70− class Show a where
71− show :: a -> Prim.String
72−
7313Type Class Instances
7414~~~~~~~~~~~~~~~~~~~~
7515
76−::
77−
78− instance applicativeFromMonad :: (Monad m) => Applicative m
79−
80− instance bitsNumber :: Bits Prim.Number
81−
82− instance boolLikeBoolean :: BoolLike Prim.Boolean
83−
84− instance categoryArr :: Category Prim.Function
85−
86− instance eqArray :: (Eq a) => Eq [a]
87−
88− instance eqBoolean :: Eq Prim.Boolean
89−
90− instance eqNumber :: Eq Prim.Number
91−
92− instance eqString :: Eq Prim.String
93−
94− instance functorFromApplicative :: (Applicative f) => Functor f
95−
96− instance numNumber :: Num Prim.Number
97−
98− instance ordNumber :: Ord Prim.Number
99−
100− instance showBoolean :: Show Prim.Boolean
101−
102− instance showNumber :: Show Prim.Number
103−
104− instance showOrdering :: Show Ordering
105−
106− instance showString :: Show Prim.String
107−
10816Values
10917~~~~~~
11018
111−::
112−
113− (!!) :: forall a. [a] -> Prim.Number -> a
114−
115− (#) :: forall a b. a -> (a -> b) -> b
116−
117− ($) :: forall a b. (a -> b) -> a -> b
118−
119− (++) :: Prim.String -> Prim.String -> Prim.String
120−
121− (<) :: forall a. (Ord a) => a -> a -> Prim.Boolean
122−
123− (<=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
124−
125− (>) :: forall a. (Ord a) => a -> a -> Prim.Boolean
126−
127− (>=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
128−
129− (>>>) :: forall a b c d. (Category a) => a b c -> a c d -> a b d
130−
131− boolAnd :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
132−
133− boolNot :: Prim.Boolean -> Prim.Boolean
134−
135− boolOr :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
136−
137− const :: forall a b. a -> b -> a
138−
139− flip :: forall a b c. (a -> b -> c) -> b -> a -> c
140−
141− numAdd :: Prim.Number -> Prim.Number -> Prim.Number
142−
143− numAnd :: Prim.Number -> Prim.Number -> Prim.Number
144−
145− numCompare :: Prim.Number -> Prim.Number -> Ordering
146−
147− numComplement :: Prim.Number -> Prim.Number
148−
149− numDiv :: Prim.Number -> Prim.Number -> Prim.Number
150−
151− numMod :: Prim.Number -> Prim.Number -> Prim.Number
152−
153− numMul :: Prim.Number -> Prim.Number -> Prim.Number
154−
155− numNegate :: Prim.Number -> Prim.Number
156−
157− numOr :: Prim.Number -> Prim.Number -> Prim.Number
158−
159− numShl :: Prim.Number -> Prim.Number -> Prim.Number
160−
161− numShr :: Prim.Number -> Prim.Number -> Prim.Number
162−
163− numSub :: Prim.Number -> Prim.Number -> Prim.Number
164−
165− numXor :: Prim.Number -> Prim.Number -> Prim.Number
166−
167− numZshr :: Prim.Number -> Prim.Number -> Prim.Number
168−
169− on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
170−
171− showNumberImpl :: Prim.Number -> Prim.String
172−
17319Module Data.Eq
17420--------------
17521
17622Types
17723~~~~~
17824
179−::
180−
181− data Ref a where
182− Ref :: a -> Ref a
183−
184−Type Classes
185−~~~~~~~~~~~~
186−
187−Type Class Instances
188−~~~~~~~~~~~~~~~~~~~~
189−
190−::
191−
192− instance eqRef :: Eq (Ref a)
193−
194−Values
195−~~~~~~
196−
197−::
198−
199− liftRef :: forall a b. (a -> a -> b) -> Ref a -> Ref a -> b
200−
201− refEq :: forall a. Ref a -> Ref a -> Prim.Boolean
202−
203− refIneq :: forall a. Ref a -> Ref a -> Prim.Boolean
204−
205−Module Data.Eq.Unsafe
206−---------------------
207−
208−Types
209−~~~~~
210−
21125Type Classes
21226~~~~~~~~~~~~
21327
@@ -217,53 +31,21 @@ Type Class Instances
21731Values
21832~~~~~~
21933
220−::
221−
222− refEq :: forall a. a -> a -> Prim.Boolean
223−
224− refIneq :: forall a. a -> a -> Prim.Boolean
225−
22634Module Control.Monad.Eff
22735------------------------
22836
22937Types
23038~~~~~
23139
232−::
233−
234− data Eff :: # ! -> * -> *
235−
236− type Pure a = forall e. Eff e a
237−
23840Type Classes
23941~~~~~~~~~~~~
24042
24143Type Class Instances
24244~~~~~~~~~~~~~~~~~~~~
24345
244−::
245−
246− instance monadEff :: Monad (Eff e)
247−
24846Values
24947~~~~~~
25048
251−::
252−
253− bindEff :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
254−
255− forE :: forall e. Prim.Number -> Prim.Number -> (Prim.Number -> Eff e { }) -> Eff e { }
256−
257− foreachE :: forall e a. [a] -> (a -> Eff e { }) -> Eff e { }
258−
259− retEff :: forall e a. a -> Eff e a
260−
261− runPure :: forall a. Pure a -> a
262−
263− untilE :: forall e. Eff e Prim.Boolean -> Eff e { }
264−
265− whileE :: forall e a. Eff e Prim.Boolean -> Eff e a -> Eff e { }
266−
26749Module Control.Monad.Eff.Unsafe
26850-------------------------------
26951
@@ -279,20 +61,12 @@ Type Class Instances
27961Values
28062~~~~~~
28163
282−::
283−
284− unsafeInterleaveEff :: forall eff1 eff2 a. Eff eff1 a -> Eff eff2 a
285−
28664Module Debug.Trace
28765------------------
28866
28967Types
29068~~~~~
29169
292−::
293−
294− data Trace :: !
295−
29670Type Classes
29771~~~~~~~~~~~~
29872
@@ -302,26 +76,12 @@ Type Class Instances
30276Values
30377~~~~~~
30478
305−::
306−
307− print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) { }
308−
309− trace :: forall r. Prim.String -> Eff (trace :: Trace | r) { }
310−
31179Module Control.Monad.ST
31280-----------------------
31381
31482Types
31583~~~~~
31684
317−::
318−
319− data ST :: * -> !
320−
321− data STArray :: * -> * -> *
322−
323− data STRef :: * -> * -> *
324−
32585Type Classes
32686~~~~~~~~~~~~
32787
@@ -331,23 +91,3 @@ Type Class Instances
33191Values
33292~~~~~~
33393
334−::
335−
336− modifySTRef :: forall a h r. STRef h a -> (a -> a) -> Eff (st :: ST h | r) a
337−
338− newSTArray :: forall a h r. Prim.Number -> a -> Eff (st :: ST h | r) (STArray h a)
339−
340− newSTRef :: forall a h r. a -> Eff (st :: ST h | r) (STRef h a)
341−
342− peekSTArray :: forall a h r. STArray h a -> Eff (st :: ST h | r) a
343−
344− pokeSTArray :: forall a h r. STArray h a -> Prim.Number -> a -> Eff (st :: ST h | r) a
345−
346− readSTRef :: forall a h r. STRef h a -> Eff (st :: ST h | r) a
347−
348− runST :: forall a r. (forall h. Eff (st :: ST h | r) a) -> Eff r a
349−
350− runSTArray :: forall a r. (forall h. Eff (st :: ST h | r) (STArray h a)) -> Eff r [a]
351−
352− writeSTRef :: forall a h r. STRef h a -> a -> Eff (st :: ST h | r) a
353−
docs/source/syntax.rst+25−2
@@ -143,7 +143,7 @@ For example::
143143Do Notation
144144-----------
145145
146−The `do` keyword introduces simple syntactic sugar for monadic expressions.
146+The ``do`` keyword introduces simple syntactic sugar for monadic expressions.
147147
148148Here is an example, using the maybe monad::
149149
@@ -166,7 +166,7 @@ Here is an example, using the maybe monad::
166166
167167``isEven`` adds two values of type ``Maybe Number`` and returns their sum, if the sum is even. If the sum is odd, ``evenSum`` returns ``Nothing``.
168168
169−When using `do` notation, the corresponding type constructor must be an instance of the `Prelude.Monad` type class, which defines the ``ret`` and ``>>=`` functions.
169+When using ``do`` notation, the corresponding type constructor must be an instance of the ``Prelude.Monad`` type class, which defines the ``ret`` and ``>>=`` functions.
170170
171171Statements can have the following form:
172172
@@ -215,3 +215,26 @@ For example, the following function increments the ``foo`` property on its argum
215215
216216 incr o = o { foo = o.foo + 1 }
217217
218+Let Bindings
219+------------
220+
221+The ``let`` keywords a collection of local declarations, which may be mutually recursive, and which may include type declarations::
222+
223+ factorial :: Number -> Number
224+ factorial =
225+ let
226+ go :: Number -> Number -> Number
227+ go acc 1 = acc
228+ go acc n = go (acc * n) (n - 1)
229+ in
230+ go 1
231+
232+The ``where`` keyword can also be used to introduce local declarations `at the end of a value declaration`::
233+
234+ factorial :: Number -> Number
235+ factorial = go 1
236+ where
237+ go :: Number -> Number -> Number
238+ go acc 1 = acc
239+ go acc n = go (acc * n) (n - 1)
240+
docs/source/typeclasses.rst+3−3
@@ -1,13 +1,13 @@
11Type Classes
22============
33
4−PureScript has basic support for type classes via the `class` and `instance` keywords.
4+PureScript has basic support for type classes via the ``class`` and ``instance`` keywords.
55
6−Type class instances must be of the form `String`, `Number`, `Boolean`, `[t]` or `C t1 ... tn`, and only a single type class parameter is supported.
6+Types appearing in class instances are must be of the form ``String``, ``Number``, ``Boolean``, or ``C t1 ... tn`` where ``C`` is a type constructor (including ``[]`` and ``->`` and ``t_i`` are types of the same form).
77
88Type class instances are resolved based on the order in which they appeared in the source files. In particular, overlapping instances are permitted.
99
10−Here is an example of the `Show` typeclass, with instances for Strings, Booleans and arrays::
10+Here is an example of the ``Show`` typeclass, with instances for ``String``, ``Booleans`` and ``[]``::
1111
1212 class Show a where
1313 show :: a -> String
docs/source/types.rst+6−7
@@ -44,9 +44,9 @@ For example::
4444
4545 test = runFoo Foo ++ runFoo (Bar "Test")
4646
47−In the example, Foo is a tagged union type which has two constructors. It's first constructor `Foo` takes no argument, and it's second ``Bar`` takes one, which must be a String.
47+In the example, Foo is a tagged union type which has two constructors. It's first constructor ``Foo`` takes no argument, and it's second ``Bar`` takes one, which must be a String.
4848
49−``runFoo`` is an example of pattern matching on a tagged union type to discover its constructor, and the last line shows how ``Foo``s are constructed.
49+``runFoo`` is an example of pattern matching on a tagged union type to discover its constructor, and the last line shows how to construct values of type ``Foo``.
5050
5151Functions
5252---------
@@ -62,7 +62,7 @@ Here is an example::
6262
6363 identity x = x
6464
65−`identity` is inferred to have (polymorphic) type ``forall t0. t0 -> t0``. This means that for any type ``t0``, ``identity`` can be given a value of type ``t0`` and will give back a value of the same type.
65+``identity`` is inferred to have (polymorphic) type ``forall t0. t0 -> t0``. This means that for any type ``t0``, ``identity`` can be given a value of type ``t0`` and will give back a value of the same type.
6666
6767A type annotation can also be provided::
6868
@@ -78,9 +78,8 @@ For example, the following function accesses two properties on a record::
7878
7979 addProps o = o.foo + o.bar
8080
81−The inferred type of `addProps` is
81+The inferred type of ``addProps`` is::
8282
83−::
8483 forall r. { foo :: Number, bar :: Number | r } -> Number
8584
8685Here, the type variable ``r`` has kind ``# *`` - it represents a `row` of `types`. It can be instantiated with any row of named types.
@@ -95,7 +94,7 @@ even though the type of ``addProps`` does not mention the property ``baz``. Howe
9594
9695 addProps { foo: 1 }
9796
98−since the `bar` property is missing.
97+since the ``bar`` property is missing.
9998
10099Rank N Types
101100------------
@@ -109,7 +108,7 @@ As an example, we can pass a polymorphic function as an argument to another func
109108 poly :: (forall a. a -> a) -> Boolean
110109 poly f = (f 0 < 1) == f true
111110
112−Notice that the polymorphic function's type argument is instantiated to both `Number` and `Boolean`.
111+Notice that the polymorphic function's type argument is instantiated to both ``Number`` and ``Boolean``.
113112
114113An argument to ``poly`` must indeed be polymorphic. For example, the following fails::
115114
prelude/README.md−227
@@ -3,189 +3,18 @@
33
44### Types
55
6− data Ordering where
7− LT :: Ordering
8− GT :: Ordering
9− EQ :: Ordering
10−
116
127### Type Classes
138
14− class Alternative f where
15− empty :: forall a. f a
16− (<|>) :: forall a. f a -> f a -> f a
17−
18− class Applicative f where
19− pure :: forall a. a -> f a
20− (<*>) :: forall a b. f (a -> b) -> f a -> f b
21−
22− class Bits b where
23− (&) :: b -> b -> b
24− (|) :: b -> b -> b
25− (^) :: b -> b -> b
26− shl :: b -> Prim.Number -> b
27− shr :: b -> Prim.Number -> b
28− zshr :: b -> Prim.Number -> b
29− complement :: b -> b
30−
31− class BoolLike b where
32− (&&) :: b -> b -> b
33− (||) :: b -> b -> b
34− not :: b -> b
35−
36− class Category a where
37− id :: forall t. a t t
38− (<<<) :: forall b c d. a c d -> a b c -> a b d
39−
40− class Eq a where
41− (==) :: a -> a -> Prim.Boolean
42− (/=) :: a -> a -> Prim.Boolean
43−
44− class Functor f where
45− (<$>) :: forall a b. (a -> b) -> f a -> f b
46−
47− class Monad m where
48− return :: forall a. a -> m a
49− (>>=) :: forall a b. m a -> (a -> m b) -> m b
50−
51− class Num a where
52− (+) :: a -> a -> a
53− (-) :: a -> a -> a
54− (*) :: a -> a -> a
55− (/) :: a -> a -> a
56− (%) :: a -> a -> a
57− negate :: a -> a
58−
59− class Ord a where
60− compare :: a -> a -> Ordering
61−
62− class Show a where
63− show :: a -> Prim.String
64−
659
6610### Type Class Instances
6711
68− instance applicativeFromMonad :: (Monad m) => Applicative m
69−
70− instance bitsNumber :: Bits Prim.Number
71−
72− instance boolLikeBoolean :: BoolLike Prim.Boolean
73−
74− instance categoryArr :: Category Prim.Function
75−
76− instance eqArray :: (Eq a) => Eq [a]
77−
78− instance eqBoolean :: Eq Prim.Boolean
79−
80− instance eqNumber :: Eq Prim.Number
81−
82− instance eqString :: Eq Prim.String
83−
84− instance functorFromApplicative :: (Applicative f) => Functor f
85−
86− instance numNumber :: Num Prim.Number
87−
88− instance ordNumber :: Ord Prim.Number
89−
90− instance showBoolean :: Show Prim.Boolean
91−
92− instance showNumber :: Show Prim.Number
93−
94− instance showOrdering :: Show Ordering
95−
96− instance showString :: Show Prim.String
97−
9812
9913### Values
10014
101− (!!) :: forall a. [a] -> Prim.Number -> a
102−
103− (#) :: forall a b. a -> (a -> b) -> b
104−
105− ($) :: forall a b. (a -> b) -> a -> b
106−
107− (++) :: Prim.String -> Prim.String -> Prim.String
108−
109− (<) :: forall a. (Ord a) => a -> a -> Prim.Boolean
110−
111− (<=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
112−
113− (>) :: forall a. (Ord a) => a -> a -> Prim.Boolean
114−
115− (>=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
116−
117− (>>>) :: forall a b c d. (Category a) => a b c -> a c d -> a b d
118−
119− boolAnd :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
120−
121− boolNot :: Prim.Boolean -> Prim.Boolean
122−
123− boolOr :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
124−
125− const :: forall a b. a -> b -> a
126−
127− flip :: forall a b c. (a -> b -> c) -> b -> a -> c
128−
129− numAdd :: Prim.Number -> Prim.Number -> Prim.Number
130−
131− numAnd :: Prim.Number -> Prim.Number -> Prim.Number
132−
133− numCompare :: Prim.Number -> Prim.Number -> Ordering
134−
135− numComplement :: Prim.Number -> Prim.Number
136−
137− numDiv :: Prim.Number -> Prim.Number -> Prim.Number
138−
139− numMod :: Prim.Number -> Prim.Number -> Prim.Number
140−
141− numMul :: Prim.Number -> Prim.Number -> Prim.Number
142−
143− numNegate :: Prim.Number -> Prim.Number
144−
145− numOr :: Prim.Number -> Prim.Number -> Prim.Number
146−
147− numShl :: Prim.Number -> Prim.Number -> Prim.Number
148−
149− numShr :: Prim.Number -> Prim.Number -> Prim.Number
150−
151− numSub :: Prim.Number -> Prim.Number -> Prim.Number
152−
153− numXor :: Prim.Number -> Prim.Number -> Prim.Number
154−
155− numZshr :: Prim.Number -> Prim.Number -> Prim.Number
156−
157− on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
158−
159− showNumberImpl :: Prim.Number -> Prim.String
160−
16115
16216## Module Data.Eq
16317
164−### Types
165−
166− data Ref a where
167− Ref :: a -> Ref a
168−
169−
170−### Type Classes
171−
172−
173−### Type Class Instances
174−
175− instance eqRef :: Eq (Ref a)
176−
177−
178−### Values
179−
180− liftRef :: forall a b. (a -> a -> b) -> Ref a -> Ref a -> b
181−
182− refEq :: forall a. Ref a -> Ref a -> Prim.Boolean
183−
184− refIneq :: forall a. Ref a -> Ref a -> Prim.Boolean
185−
186−
187−## Module Data.Eq.Unsafe
188−
18918### Types
19019
19120
@@ -197,44 +26,20 @@
19726
19827### Values
19928
200− refEq :: forall a. a -> a -> Prim.Boolean
201−
202− refIneq :: forall a. a -> a -> Prim.Boolean
203−
20429
20530## Module Control.Monad.Eff
20631
20732### Types
20833
209− data Eff :: # ! -> * -> *
210−
211− type Pure a = forall e. Eff e a
212−
21334
21435### Type Classes
21536
21637
21738### Type Class Instances
21839
219− instance monadEff :: Monad (Eff e)
220−
22140
22241### Values
22342
224− bindEff :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
225−
226− forE :: forall e. Prim.Number -> Prim.Number -> (Prim.Number -> Eff e { }) -> Eff e { }
227−
228− foreachE :: forall e a. [a] -> (a -> Eff e { }) -> Eff e { }
229−
230− retEff :: forall e a. a -> Eff e a
231−
232− runPure :: forall a. Pure a -> a
233−
234− untilE :: forall e. Eff e Prim.Boolean -> Eff e { }
235−
236− whileE :: forall e a. Eff e Prim.Boolean -> Eff e a -> Eff e { }
237−
23843
23944## Module Control.Monad.Eff.Unsafe
24045
@@ -249,15 +54,11 @@
24954
25055### Values
25156
252− unsafeInterleaveEff :: forall eff1 eff2 a. Eff eff1 a -> Eff eff2 a
253−
25457
25558## Module Debug.Trace
25659
25760### Types
25861
259− data Trace :: !
260−
26162
26263### Type Classes
26364
@@ -267,21 +68,11 @@
26768
26869### Values
26970
270− print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) { }
271−
272− trace :: forall r. Prim.String -> Eff (trace :: Trace | r) { }
273−
27471
27572## Module Control.Monad.ST
27673
27774### Types
27875
279− data ST :: * -> !
280−
281− data STArray :: * -> * -> *
282−
283− data STRef :: * -> * -> *
284−
28576
28677### Type Classes
28778
@@ -291,23 +82,5 @@
29182
29283### Values
29384
294− modifySTRef :: forall a h r. STRef h a -> (a -> a) -> Eff (st :: ST h | r) a
295−
296− newSTArray :: forall a h r. Prim.Number -> a -> Eff (st :: ST h | r) (STArray h a)
297−
298− newSTRef :: forall a h r. a -> Eff (st :: ST h | r) (STRef h a)
299−
300− peekSTArray :: forall a h r. STArray h a -> Eff (st :: ST h | r) a
301−
302− pokeSTArray :: forall a h r. STArray h a -> Prim.Number -> a -> Eff (st :: ST h | r) a
303−
304− readSTRef :: forall a h r. STRef h a -> Eff (st :: ST h | r) a
305−
306− runST :: forall a r. (forall h. Eff (st :: ST h | r) a) -> Eff r a
307−
308− runSTArray :: forall a r. (forall h. Eff (st :: ST h | r) (STArray h a)) -> Eff r [a]
309−
310− writeSTRef :: forall a h r. STRef h a -> a -> Eff (st :: ST h | r) a
311−
31285
31386