1.1 --- a/src/Pure/ML-Systems/polyml_old_basis.ML Sat May 30 22:37:38 2009 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,29 +0,0 @@
1.4 -(* Title: Pure/ML-Systems/polyml_old_basis.ML
1.5 -
1.6 -Fixes for the old SML basis library (before Poly/ML 4.2.0).
1.7 -*)
1.8 -
1.9 -structure String =
1.10 -struct
1.11 - fun isSuffix s1 s2 =
1.12 - let val n1 = size s1 and n2 = size s2
1.13 - in if n1 = n2 then s1 = s2 else n1 <= n2 andalso String.substring (s2, n2 - n1, n1) = s1 end;
1.14 - fun isSubstring s1 s2 =
1.15 - String.isPrefix s1 s2 orelse
1.16 - size s1 < size s2 andalso isSubstring s1 (String.extract (s2, 1, NONE));
1.17 - open String;
1.18 -end;
1.19 -
1.20 -structure Substring =
1.21 -struct
1.22 - open Substring;
1.23 - val full = all;
1.24 -end;
1.25 -
1.26 -structure TextIO =
1.27 -struct
1.28 - open TextIO;
1.29 - fun inputLine is =
1.30 - let val s = TextIO.inputLine is
1.31 - in if s = "" then NONE else SOME s end;
1.32 -end;