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