@@ -28,44 +28,44 @@ interface Eq a where
2828 x /= y = not (x == y)
2929 x == y = not (x /= y)
3030
31−implementation Eq () where
31+Eq () where
3232 () == () = True
3333
34−implementation Eq Int where
34+Eq Int where
3535 (==) = boolOp prim__eqInt
3636
37−implementation Eq Integer where
37+Eq Integer where
3838 (==) = boolOp prim__eqBigInt
3939
40−implementation Eq Double where
40+Eq Double where
4141 (==) = boolOp prim__eqFloat
4242
43−implementation Eq Char where
43+Eq Char where
4444 (==) = boolOp prim__eqChar
4545
46−implementation Eq String where
46+Eq String where
4747 (==) = boolOp prim__eqString
4848
49−implementation Eq Ptr where
49+Eq Ptr where
5050 (==) = boolOp prim__eqPtr
5151
52−implementation Eq ManagedPtr where
52+Eq ManagedPtr where
5353 (==) = boolOp prim__eqManagedPtr
5454
55−implementation Eq Bool where
55+Eq Bool where
5656 True == True = True
5757 True == False = False
5858 False == True = False
5959 False == False = True
6060
61−implementation (Eq a, Eq b) => Eq (a, b) where
61+(Eq a, Eq b) => Eq (a, b) where
6262 (==) (a, c) (b, d) = (a == b) && (c == d)
6363
6464
6565-- ---------------------------------------------------------- [ Ordering Interface ]
6666%elim data Ordering = LT | EQ | GT
6767
68−implementation Eq Ordering where
68+Eq Ordering where
6969 LT == LT = True
7070 EQ == EQ = True
7171 GT == GT = True
@@ -103,47 +103,47 @@ interface Eq a => Ord a where
103103 min : a -> a -> a
104104 min x y = if (x < y) then x else y
105105
106−implementation Ord () where
106+Ord () where
107107 compare () () = EQ
108108
109−implementation Ord Int where
109+Ord Int where
110110 compare x y = if (x == y) then EQ else
111111 if (boolOp prim__sltInt x y) then LT else
112112 GT
113113
114114
115−implementation Ord Integer where
115+Ord Integer where
116116 compare x y = if (x == y) then EQ else
117117 if (boolOp prim__sltBigInt x y) then LT else
118118 GT
119119
120120
121−implementation Ord Double where
121+Ord Double where
122122 compare x y = if (x == y) then EQ else
123123 if (boolOp prim__sltFloat x y) then LT else
124124 GT
125125
126126
127−implementation Ord Char where
127+Ord Char where
128128 compare x y = if (x == y) then EQ else
129129 if (boolOp prim__sltChar x y) then LT else
130130 GT
131131
132132
133−implementation Ord String where
133+Ord String where
134134 compare x y = if (x == y) then EQ else
135135 if (boolOp prim__ltString x y) then LT else
136136 GT
137137
138138
139−implementation Ord Bool where
139+Ord Bool where
140140 compare True True = EQ
141141 compare False False = EQ
142142 compare False True = LT
143143 compare True False = GT
144144
145145
146−implementation (Ord a, Ord b) => Ord (a, b) where
146+(Ord a, Ord b) => Ord (a, b) where
147147 compare (xl, xr) (yl, yr) =
148148 if xl /= yl
149149 then compare xl yl
@@ -157,41 +157,41 @@ interface Num a where
157157 ||| Conversion from Integer.
158158 fromInteger : Integer -> a
159159
160−implementation Num Integer where
160+Num Integer where
161161 (+) = prim__addBigInt
162162 (*) = prim__mulBigInt
163163
164164 fromInteger = id
165165
166−implementation Num Int where
166+Num Int where
167167 (+) = prim__addInt
168168 (*) = prim__mulInt
169169
170170 fromInteger = prim__truncBigInt_Int
171171
172172
173−implementation Num Double where
173+Num Double where
174174 (+) = prim__addFloat
175175 (*) = prim__mulFloat
176176
177177 fromInteger = prim__toFloatBigInt
178178
179−implementation Num Bits8 where
179+Num Bits8 where
180180 (+) = prim__addB8
181181 (*) = prim__mulB8
182182 fromInteger = prim__truncBigInt_B8
183183
184−implementation Num Bits16 where
184+Num Bits16 where
185185 (+) = prim__addB16
186186 (*) = prim__mulB16
187187 fromInteger = prim__truncBigInt_B16
188188
189−implementation Num Bits32 where
189+Num Bits32 where
190190 (+) = prim__addB32
191191 (*) = prim__mulB32
192192 fromInteger = prim__truncBigInt_B32
193193
194−implementation Num Bits64 where
194+Num Bits64 where
195195 (+) = prim__addB64
196196 (*) = prim__mulB64
197197 fromInteger = prim__truncBigInt_B64
@@ -199,41 +199,41 @@ implementation Num Bits64 where
199199-- --------------------------------------------------------- [ Negatable Interface ]
200200||| The `Neg` interface defines operations on numbers which can be negative.
201201interface Num a => Neg a where
202− ||| The underlying implementation of unary minus. `-5` desugars to `negate (fromInteger 5)`.
202+ ||| The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.
203203 negate : a -> a
204204 (-) : a -> a -> a
205205 ||| Absolute value
206206 abs : a -> a
207207
208−implementation Neg Integer where
208+Neg Integer where
209209 negate x = prim__subBigInt 0 x
210210 (-) = prim__subBigInt
211211 abs x = if x < 0 then -x else x
212212
213−implementation Neg Int where
213+Neg Int where
214214 negate x = prim__subInt 0 x
215215 (-) = prim__subInt
216216 abs x = if x < (prim__truncBigInt_Int 0) then -x else x
217217
218−implementation Neg Double where
218+Neg Double where
219219 negate x = prim__negFloat x
220220 (-) = prim__subFloat
221221 abs x = if x < (prim__toFloatBigInt 0) then -x else x
222222
223223-- ------------------------------------------------------------
224−implementation Eq Bits8 where
224+Eq Bits8 where
225225 x == y = intToBool (prim__eqB8 x y)
226226
227−implementation Eq Bits16 where
227+Eq Bits16 where
228228 x == y = intToBool (prim__eqB16 x y)
229229
230−implementation Eq Bits32 where
230+Eq Bits32 where
231231 x == y = intToBool (prim__eqB32 x y)
232232
233−implementation Eq Bits64 where
233+Eq Bits64 where
234234 x == y = intToBool (prim__eqB64 x y)
235235
236−implementation Ord Bits8 where
236+Ord Bits8 where
237237 (<) = boolOp prim__ltB8
238238 (>) = boolOp prim__gtB8
239239 (<=) = boolOp prim__lteB8
@@ -242,7 +242,7 @@ implementation Ord Bits8 where
242242 else if l > r then GT
243243 else EQ
244244
245−implementation Ord Bits16 where
245+Ord Bits16 where
246246 (<) = boolOp prim__ltB16
247247 (>) = boolOp prim__gtB16
248248 (<=) = boolOp prim__lteB16
@@ -251,7 +251,7 @@ implementation Ord Bits16 where
251251 else if l > r then GT
252252 else EQ
253253
254−implementation Ord Bits32 where
254+Ord Bits32 where
255255 (<) = boolOp prim__ltB32
256256 (>) = boolOp prim__gtB32
257257 (<=) = boolOp prim__lteB32
@@ -260,7 +260,7 @@ implementation Ord Bits32 where
260260 else if l > r then GT
261261 else EQ
262262
263−implementation Ord Bits64 where
263+Ord Bits64 where
264264 (<) = boolOp prim__ltB64
265265 (>) = boolOp prim__gtB64
266266 (<=) = boolOp prim__lteB64
@@ -279,28 +279,28 @@ interface Ord b => MaxBound b where
279279 ||| The upper bound for the type
280280 maxBound : b
281281
282−implementation MinBound Bits8 where
282+MinBound Bits8 where
283283 minBound = 0x0
284284
285−implementation MaxBound Bits8 where
285+MaxBound Bits8 where
286286 maxBound = 0xff
287287
288−implementation MinBound Bits16 where
288+MinBound Bits16 where
289289 minBound = 0x0
290290
291−implementation MaxBound Bits16 where
291+MaxBound Bits16 where
292292 maxBound = 0xffff
293293
294−implementation MinBound Bits32 where
294+MinBound Bits32 where
295295 minBound = 0x0
296296
297−implementation MaxBound Bits32 where
297+MaxBound Bits32 where
298298 maxBound = 0xffffffff
299299
300−implementation MinBound Bits64 where
300+MinBound Bits64 where
301301 minBound = 0x0
302302
303−implementation MaxBound Bits64 where
303+MaxBound Bits64 where
304304 maxBound = 0xffffffffffffffff
305305
306306
@@ -327,7 +327,7 @@ modBigInt : Integer -> Integer -> Integer
327327modBigInt x y = case y == 0 of
328328 False => prim__sremBigInt x y
329329
330−implementation Integral Integer where
330+Integral Integer where
331331 div = divBigInt
332332 mod = modBigInt
333333
@@ -341,7 +341,7 @@ modInt : Int -> Int -> Int
341341modInt x y = case y == 0 of
342342 False => prim__sremInt x y
343343
344−implementation Integral Int where
344+Integral Int where
345345 div = divInt
346346 mod = modInt
347347
@@ -354,7 +354,7 @@ modB8 : Bits8 -> Bits8 -> Bits8
354354modB8 x y = case y == 0 of
355355 False => prim__sremB8 x y
356356
357−implementation Integral Bits8 where
357+Integral Bits8 where
358358 div = divB8
359359 mod = modB8
360360
@@ -367,7 +367,7 @@ modB16 : Bits16 -> Bits16 -> Bits16
367367modB16 x y = case y == 0 of
368368 False => prim__sremB16 x y
369369
370−implementation Integral Bits16 where
370+Integral Bits16 where
371371 div = divB16
372372 mod = modB16
373373
@@ -380,7 +380,7 @@ modB32 : Bits32 -> Bits32 -> Bits32
380380modB32 x y = case y == 0 of
381381 False => prim__sremB32 x y
382382
383−implementation Integral Bits32 where
383+Integral Bits32 where
384384 div = divB32
385385 mod = modB32
386386
@@ -393,7 +393,7 @@ modB64 : Bits64 -> Bits64 -> Bits64
393393modB64 x y = case y == 0 of
394394 False => prim__sremB64 x y
395395
396−implementation Integral Bits64 where
396+Integral Bits64 where
397397 div = divB64
398398 mod = modB64
399399