24584
|
1 |
(* Title: Pure/ML-Systems/overloading_smlnj.ML
|
24158
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
|
|
5 |
*)
|
|
6 |
|
|
7 |
Control.overloadKW := true;
|
|
8 |
|
|
9 |
overload ~ : ('a -> 'a) as
|
24160
|
10 |
IntInf.~ and Int31.~ and Int32.~ and Int64.~ and
|
|
11 |
Word.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
|
24158
|
12 |
overload + : ('a * 'a -> 'a) as
|
24160
|
13 |
IntInf.+ and Int31.+ and Int32.+ and Int64.+ and
|
|
14 |
Word.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
|
24158
|
15 |
overload - : ('a * 'a -> 'a) as
|
24160
|
16 |
IntInf.- and Int31.- and Int32.- and Int64.- and
|
|
17 |
Word.- and Word8.- and Word32.- and Word64.- and Real.-;
|
24158
|
18 |
overload * : ('a * 'a -> 'a) as
|
24160
|
19 |
IntInf.* and Int31.* and Int32.* and Int64.* and
|
|
20 |
Word.* and Word8.* and Word32.* and Word64.* and Real.*;
|
24158
|
21 |
overload div: ('a * 'a -> 'a) as
|
24160
|
22 |
IntInf.div and Int31.div and Int32.div and Int64.div and
|
|
23 |
Word.div and Word8.div and Word32.div and Word64.div;
|
24158
|
24 |
overload mod: ('a * 'a -> 'a) as
|
24160
|
25 |
IntInf.mod and Int31.mod and Int32.mod and Int64.mod and
|
|
26 |
Word.mod and Word8.mod and Word32.mod and Word64.mod;
|
24158
|
27 |
overload < : ('a * 'a -> bool) as
|
24169
|
28 |
IntInf.< and Int31.< and Int32.< and Int64.< and Real.< and
|
24160
|
29 |
Word.< and Word8.< and Word32.< and Word64.< and Char.< and String.<;
|
24158
|
30 |
overload <= : ('a * 'a -> bool) as
|
24169
|
31 |
IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Real.<= and
|
24160
|
32 |
Word.<= and Word8.<= and Word32.<= and Word64.<= and Char.<= and String.<=;
|
24158
|
33 |
overload > : ('a * 'a -> bool) as
|
24169
|
34 |
IntInf.> and Int31.> and Int32.> and Int64.> and Real.> and
|
24160
|
35 |
Word.> and Word8.> and Word32.> and Word64.> and Char.> and String.>;
|
24158
|
36 |
overload >= : ('a * 'a -> bool) as
|
24169
|
37 |
IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Real.>= and
|
24160
|
38 |
Word.>= and Word8.>= and Word32.>= and Word64.>= and Char.>= and String.>=;
|
24158
|
39 |
overload abs: ('a -> 'a) as IntInf.abs and Int31.abs and Int32.abs and Int64.abs and Real.abs;
|
|
40 |
|
|
41 |
Control.overloadKW := false;
|