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