src/Pure/ML-Systems/overloading_smlnj.ML
author haftmann
Mon, 08 Feb 2010 17:12:22 +0100
changeset 35045 a77d200e6503
parent 29564 f8b933a62151
permissions -rw-r--r--
using code antiquotation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24584
01e83ffa6c54 fixed title
haftmann
parents: 24169
diff changeset
     1
(*  Title:      Pure/ML-Systems/overloading_smlnj.ML
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     3
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     4
Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     5
*)
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     6
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     7
Control.overloadKW := true;
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     8
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     9
overload ~ : ('a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    10
  IntInf.~ and Int31.~ and Int32.~ and Int64.~ and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    11
  Word.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    12
overload + : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    13
  IntInf.+ and Int31.+ and Int32.+ and Int64.+ and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    14
  Word.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    15
overload - : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    16
  IntInf.- and Int31.- and Int32.- and Int64.- and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    17
  Word.- and Word8.- and Word32.- and Word64.- and Real.-;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    18
overload * : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    19
  IntInf.* and Int31.* and Int32.* and Int64.* and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    20
  Word.* and Word8.* and Word32.* and Word64.* and Real.*;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    21
overload div: ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    22
  IntInf.div and Int31.div and Int32.div and Int64.div and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    23
  Word.div and Word8.div and Word32.div and Word64.div;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    24
overload mod: ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    25
  IntInf.mod and Int31.mod and Int32.mod and Int64.mod and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    26
  Word.mod and Word8.mod and Word32.mod and Word64.mod;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    27
overload < : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    28
  IntInf.< and Int31.< and Int32.< and Int64.< and Real.< and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    29
  Word.< and Word8.< and Word32.< and Word64.< and Char.< and String.<;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    30
overload <= : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    31
  IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Real.<= and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    32
  Word.<= and Word8.<= and Word32.<= and Word64.<= and Char.<= and String.<=;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    33
overload > : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    34
  IntInf.> and Int31.> and Int32.> and Int64.> and Real.> and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    35
  Word.> and Word8.> and Word32.> and Word64.> and Char.> and String.>;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    36
overload >= : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    37
  IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Real.>= and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    38
  Word.>= and Word8.>= and Word32.>= and Word64.>= and Char.>= and String.>=;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    39
overload abs: ('a -> 'a) as IntInf.abs and Int31.abs and Int32.abs and Int64.abs and Real.abs;
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    40
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    41
Control.overloadKW := false;