src/Pure/ML-Systems/overloading_smlnj.ML
author haftmann
Sat, 15 Sep 2007 19:27:35 +0200
changeset 24584 01e83ffa6c54
parent 24169 29c9da443edc
child 29564 f8b933a62151
permissions -rw-r--r--
fixed title
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
    ID:         $Id$
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     3
    Author:     Makarius
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     4
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     5
Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     6
*)
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     7
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     8
Control.overloadKW := true;
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
     9
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    10
overload ~ : ('a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    11
  IntInf.~ and Int31.~ and Int32.~ and Int64.~ and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    12
  Word.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    13
overload + : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    14
  IntInf.+ and Int31.+ and Int32.+ and Int64.+ and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    15
  Word.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    16
overload - : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    17
  IntInf.- and Int31.- and Int32.- and Int64.- and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    18
  Word.- and Word8.- and Word32.- and Word64.- and Real.-;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    19
overload * : ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    20
  IntInf.* and Int31.* and Int32.* and Int64.* and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    21
  Word.* and Word8.* and Word32.* and Word64.* and Real.*;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    22
overload div: ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    23
  IntInf.div and Int31.div and Int32.div and Int64.div and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    24
  Word.div and Word8.div and Word32.div and Word64.div;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    25
overload mod: ('a * 'a -> 'a) as
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    26
  IntInf.mod and Int31.mod and Int32.mod and Int64.mod and
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    27
  Word.mod and Word8.mod and Word32.mod and Word64.mod;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    28
overload < : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    29
  IntInf.< and Int31.< and Int32.< and Int64.< and Real.< and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    30
  Word.< and Word8.< and Word32.< and Word64.< and Char.< and String.<;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    31
overload <= : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    32
  IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Real.<= and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    33
  Word.<= and Word8.<= and Word32.<= and Word64.<= and Char.<= and String.<=;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    34
overload > : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    35
  IntInf.> and Int31.> and Int32.> and Int64.> and Real.> and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    36
  Word.> and Word8.> and Word32.> and Word64.> and Char.> and String.>;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    37
overload >= : ('a * 'a -> bool) as
24169
29c9da443edc added more instances;
wenzelm
parents: 24160
diff changeset
    38
  IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Real.>= and
24160
ec506abf6183 added more instances;
wenzelm
parents: 24158
diff changeset
    39
  Word.>= and Word8.>= and Word32.>= and Word64.>= and Char.>= and String.>=;
24158
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    40
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
    41
ebecbe4f53ae Overloading in SML/NJ.
wenzelm
parents:
diff changeset
    42
Control.overloadKW := false;