src/Pure/ML-Systems/mosml.ML
changeset 17491 2bd5a6e26e1e
parent 16993 2ec0b8159e8e
child 17824 36b2978d339a
equal deleted inserted replaced
17490:ec62f340e811 17491:2bd5a6e26e1e
     1 (*  Title:      Pure/ML-Systems/mosml.ML
     1 (*  Title:      Pure/ML-Systems/mosml.ML
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1999  University of Cambridge
     4     Copyright   1999  University of Cambridge
     5 
     5 
     6 Compatibility file for Moscow ML 2.00
     6 Compatibility file for Moscow ML 2.01
     7 
     7 
     8 NOTE: saving images does not work (yet!?), may run it interactively as follows:
     8 NOTE: saving images does not work; may run it interactively as follows:
     9 
     9 
    10 $ cd ~~/src/Pure
    10 $ cd ~~/src/Pure
    11 $ isabelle RAW_ML_SYSTEM
    11 $ isabelle RAW_ML_SYSTEM
    12 > val ml_system = "mosml";
    12 > val ml_system = "mosml";
    13 > use "ML-Systems/mosml.ML";
    13 > use "ML-Systems/mosml.ML";
    40 
    40 
    41 structure Real =
    41 structure Real =
    42 struct
    42 struct
    43   open Real;
    43   open Real;
    44   val realFloor = real o floor;
    44   val realFloor = real o floor;
       
    45 end;
       
    46 
       
    47 structure String =
       
    48 struct
       
    49   fun isSuffix s1 s2 =
       
    50     let val n1 = size s1 and n2 = size s2
       
    51     in if n1 = n2 then s1 = s2 else n1 <= n2 andalso String.substring (s2, n2 - n1, n1) = s1 end;
       
    52   open String;
    45 end;
    53 end;
    46 
    54 
    47 structure Time =
    55 structure Time =
    48 struct
    56 struct
    49   open Time;
    57   open Time;