@@ -186,29 +186,29 @@ pub fun fold-while( n : int, init : a, f : (int,a) -> e maybe<a> ) : e a
186
186
// ----------------------------------------------------------------------------
187
187
188
188
// Generic inequality
189
- pub fun default/ (!=) (x : a, y : a, ? (== ) : ( a, a) -> bool ) : bool
189
+ pub fun default/ (!=) (x : a, y : a, ? (== ) : ( a, a) -> e bool ) : e bool
190
190
not(x== y)
191
191
192
192
// Generic equality if `cmp` exists
193
- pub fun default/cmp/ (==) (x : a, y : a, ? cmp : ( a, a) -> order ) : bool
193
+ pub fun default/cmp/ (==) (x : a, y : a, ? cmp : ( a, a) -> e order ) : e bool
194
194
match cmp(x,y)
195
195
Eq -> True
196
196
_ -> False
197
197
198
198
// Generic greater than
199
- pub fun default/cmp/ (>) (x : a, y : a, ? cmp : ( a, a) -> order ) : bool
199
+ pub fun default/cmp/ (>) (x : a, y : a, ? cmp : ( a, a) -> e order ) : e bool
200
200
cmp(x,y) == Gt
201
201
202
202
// Generic lower than
203
- pub fun default/cmp/ (<) (x : a, y : a, ? cmp : ( a, a) -> order ) : bool
203
+ pub fun default/cmp/ (<) (x : a, y : a, ? cmp : ( a, a) -> e order ) : e bool
204
204
cmp(x,y) == Lt
205
205
206
206
// Generic greater than or equal
207
- pub fun default/cmp/ (>=) (x : a, y : a, ? cmp : ( a, a) -> order ) : bool
207
+ pub fun default/cmp/ (>=) (x : a, y : a, ? cmp : ( a, a) -> e order ) : e bool
208
208
y < x
209
209
210
210
// Generic lower than or equal
211
- pub fun default/cmp/ (<=) (x : a, y : a, ? cmp : ( a, a) -> order ) : bool
211
+ pub fun default/cmp/ (<=) (x : a, y : a, ? cmp : ( a, a) -> e order ) : e bool
212
212
y > x
213
213
214
214
0 commit comments