src/Pure/ML-Systems/overloading_smlnj.ML
author haftmann
Tue Oct 20 16:13:01 2009 +0200 (2009-10-20)
changeset 33037 b22e44496dc2
parent 29564 f8b933a62151
permissions -rw-r--r--
replaced old_style infixes eq_set, subset, union, inter and variants by generic versions
haftmann@24584
     1
(*  Title:      Pure/ML-Systems/overloading_smlnj.ML
wenzelm@24158
     2
    Author:     Makarius
wenzelm@24158
     3
wenzelm@24158
     4
Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
wenzelm@24158
     5
*)
wenzelm@24158
     6
wenzelm@24158
     7
Control.overloadKW := true;
wenzelm@24158
     8
wenzelm@24158
     9
overload ~ : ('a -> 'a) as
wenzelm@24160
    10
  IntInf.~ and Int31.~ and Int32.~ and Int64.~ and
wenzelm@24160
    11
  Word.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
wenzelm@24158
    12
overload + : ('a * 'a -> 'a) as
wenzelm@24160
    13
  IntInf.+ and Int31.+ and Int32.+ and Int64.+ and
wenzelm@24160
    14
  Word.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
wenzelm@24158
    15
overload - : ('a * 'a -> 'a) as
wenzelm@24160
    16
  IntInf.- and Int31.- and Int32.- and Int64.- and
wenzelm@24160
    17
  Word.- and Word8.- and Word32.- and Word64.- and Real.-;
wenzelm@24158
    18
overload * : ('a * 'a -> 'a) as
wenzelm@24160
    19
  IntInf.* and Int31.* and Int32.* and Int64.* and
wenzelm@24160
    20
  Word.* and Word8.* and Word32.* and Word64.* and Real.*;
wenzelm@24158
    21
overload div: ('a * 'a -> 'a) as
wenzelm@24160
    22
  IntInf.div and Int31.div and Int32.div and Int64.div and
wenzelm@24160
    23
  Word.div and Word8.div and Word32.div and Word64.div;
wenzelm@24158
    24
overload mod: ('a * 'a -> 'a) as
wenzelm@24160
    25
  IntInf.mod and Int31.mod and Int32.mod and Int64.mod and
wenzelm@24160
    26
  Word.mod and Word8.mod and Word32.mod and Word64.mod;
wenzelm@24158
    27
overload < : ('a * 'a -> bool) as
wenzelm@24169
    28
  IntInf.< and Int31.< and Int32.< and Int64.< and Real.< and
wenzelm@24160
    29
  Word.< and Word8.< and Word32.< and Word64.< and Char.< and String.<;
wenzelm@24158
    30
overload <= : ('a * 'a -> bool) as
wenzelm@24169
    31
  IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Real.<= and
wenzelm@24160
    32
  Word.<= and Word8.<= and Word32.<= and Word64.<= and Char.<= and String.<=;
wenzelm@24158
    33
overload > : ('a * 'a -> bool) as
wenzelm@24169
    34
  IntInf.> and Int31.> and Int32.> and Int64.> and Real.> and
wenzelm@24160
    35
  Word.> and Word8.> and Word32.> and Word64.> and Char.> and String.>;
wenzelm@24158
    36
overload >= : ('a * 'a -> bool) as
wenzelm@24169
    37
  IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Real.>= and
wenzelm@24160
    38
  Word.>= and Word8.>= and Word32.>= and Word64.>= and Char.>= and String.>=;
wenzelm@24158
    39
overload abs: ('a -> 'a) as IntInf.abs and Int31.abs and Int32.abs and Int64.abs and Real.abs;
wenzelm@24158
    40
wenzelm@24158
    41
Control.overloadKW := false;