src/Pure/ML-Systems/overloading_smlnj.ML
changeset 24158 ebecbe4f53ae
child 24160 ec506abf6183
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/ML-Systems/overloading_smlnj.ML	Mon Aug 06 19:35:43 2007 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +(*  Title:      Pure/ML-Systems/overloading-smlnj.ML
     1.5 +    ID:         $Id$
     1.6 +    Author:     Makarius
     1.7 +
     1.8 +Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
     1.9 +*)
    1.10 +
    1.11 +Control.overloadKW := true;
    1.12 +
    1.13 +overload ~ : ('a -> 'a) as
    1.14 +  IntInf.~ and Int31.~ and Int32.~ and Int64.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
    1.15 +overload + : ('a * 'a -> 'a) as
    1.16 +  IntInf.+ and Int31.+ and Int32.+ and Int64.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
    1.17 +overload - : ('a * 'a -> 'a) as
    1.18 +  IntInf.- and Int31.- and Int32.- and Int64.- and Word8.- and Word32.- and Word64.- and Real.-;
    1.19 +overload * : ('a * 'a -> 'a) as
    1.20 +  IntInf.* and Int31.* and Int32.* and Int64.* and Word8.* and Word32.* and Word64.* and Real.*;
    1.21 +overload div: ('a * 'a -> 'a) as
    1.22 +  IntInf.div and Int31.div and Int32.div and Int64.div and Word8.div and Word32.div and Word64.div;
    1.23 +overload mod: ('a * 'a -> 'a) as
    1.24 +  IntInf.mod and Int31.mod and Int32.mod and Int64.mod and Word8.mod and Word32.mod and Word64.mod;
    1.25 +overload < : ('a * 'a -> bool) as
    1.26 +  IntInf.< and Int31.< and Int32.< and Int64.< and Word8.< and Word32.< and Word64.< and
    1.27 +  Char.< and String.<;
    1.28 +overload <= : ('a * 'a -> bool) as
    1.29 +  IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Word8.<= and Word32.<= and Word64.<= and
    1.30 +  Char.<= and String.<=;
    1.31 +overload > : ('a * 'a -> bool) as
    1.32 +  IntInf.> and Int31.> and Int32.> and Int64.> and Word8.> and Word32.> and Word64.> and
    1.33 +  Char.> and String.>;
    1.34 +overload >= : ('a * 'a -> bool) as
    1.35 +  IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Word8.>= and Word32.>= and Word64.>= and
    1.36 +  Char.>= and String.>=;
    1.37 +overload abs: ('a -> 'a) as IntInf.abs and Int31.abs and Int32.abs and Int64.abs and Real.abs;
    1.38 +
    1.39 +Control.overloadKW := false;