src/Pure/ML-Systems/overloading_smlnj.ML
author wenzelm
Sat Nov 27 16:29:53 2010 +0100 (2010-11-27 ago)
changeset 40748 591b6778d076
parent 29564 f8b933a62151
permissions -rw-r--r--
removed bash from ML system bootstrap, and past the Secure ML barrier;
     1 (*  Title:      Pure/ML-Systems/overloading_smlnj.ML
     2     Author:     Makarius
     3 
     4 Overloading in SML/NJ (cf. smlnj/base/system/smlnj/init/pervasive.sml).
     5 *)
     6 
     7 Control.overloadKW := true;
     8 
     9 overload ~ : ('a -> 'a) as
    10   IntInf.~ and Int31.~ and Int32.~ and Int64.~ and
    11   Word.~ and Word8.~ and Word32.~ and Word64.~ and Real.~;
    12 overload + : ('a * 'a -> 'a) as
    13   IntInf.+ and Int31.+ and Int32.+ and Int64.+ and
    14   Word.+ and Word8.+ and Word32.+ and Word64.+ and Real.+;
    15 overload - : ('a * 'a -> 'a) as
    16   IntInf.- and Int31.- and Int32.- and Int64.- and
    17   Word.- and Word8.- and Word32.- and Word64.- and Real.-;
    18 overload * : ('a * 'a -> 'a) as
    19   IntInf.* and Int31.* and Int32.* and Int64.* and
    20   Word.* and Word8.* and Word32.* and Word64.* and Real.*;
    21 overload div: ('a * 'a -> 'a) as
    22   IntInf.div and Int31.div and Int32.div and Int64.div and
    23   Word.div and Word8.div and Word32.div and Word64.div;
    24 overload mod: ('a * 'a -> 'a) as
    25   IntInf.mod and Int31.mod and Int32.mod and Int64.mod and
    26   Word.mod and Word8.mod and Word32.mod and Word64.mod;
    27 overload < : ('a * 'a -> bool) as
    28   IntInf.< and Int31.< and Int32.< and Int64.< and Real.< and
    29   Word.< and Word8.< and Word32.< and Word64.< and Char.< and String.<;
    30 overload <= : ('a * 'a -> bool) as
    31   IntInf.<= and Int31.<= and Int32.<= and Int64.<= and Real.<= and
    32   Word.<= and Word8.<= and Word32.<= and Word64.<= and Char.<= and String.<=;
    33 overload > : ('a * 'a -> bool) as
    34   IntInf.> and Int31.> and Int32.> and Int64.> and Real.> and
    35   Word.> and Word8.> and Word32.> and Word64.> and Char.> and String.>;
    36 overload >= : ('a * 'a -> bool) as
    37   IntInf.>= and Int31.>= and Int32.>= and Int64.>= and Real.>= and
    38   Word.>= and Word8.>= and Word32.>= and Word64.>= and Char.>= and String.>=;
    39 overload abs: ('a -> 'a) as IntInf.abs and Int31.abs and Int32.abs and Int64.abs and Real.abs;
    40 
    41 Control.overloadKW := false;