author | paulson |
Tue, 26 Nov 1996 16:29:30 +0100 | |
changeset 2230 | 275a5a699ff7 |
parent 2217 | 411f4683feb6 |
child 2265 | 3123fef88dce |
permissions | -rw-r--r-- |
2217 | 1 |
(* Title: Pure/NJ |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1993 University of Cambridge |
|
5 |
||
6 |
Basis Library emulation |
|
7 |
||
8 |
Needed for Poly/ML and Standard ML of New Jersey version 0.93 |
|
9 |
||
10 |
Full compatibility cannot be obtained using a file: what about char constants? |
|
11 |
*) |
|
12 |
||
2230
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
13 |
structure Bool = |
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
14 |
struct |
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
15 |
fun toString true = "true" |
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
16 |
| toString false = "false" |
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
17 |
end; |
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
18 |
|
2217 | 19 |
structure Int = |
20 |
struct |
|
2230
275a5a699ff7
Structure Bool and value Int.toString needed to replace makestring calls
paulson
parents:
2217
diff
changeset
|
21 |
fun toString (i: int) = makestring i; |
2217 | 22 |
fun max (x, y) = if x < y then y else x : int; |
23 |
fun min (x, y) = if x < y then x else y : int; |
|
24 |
end; |
|
25 |
||
26 |
structure TextIO = |
|
27 |
struct |
|
28 |
type instream = instream |
|
29 |
and outstream = outstream |
|
30 |
exception Io of {name: string, function: string, cause: exn} |
|
31 |
val stdIn = std_in |
|
32 |
val stdOut = std_out |
|
33 |
val openIn = open_in |
|
34 |
val openAppend = open_append |
|
35 |
val openOut = open_out |
|
36 |
val closeIn = close_in |
|
37 |
val closeOut = close_out |
|
38 |
val inputN = input |
|
39 |
val inputAll = fn is => inputN (is, 999999) |
|
40 |
val inputLine = input_line |
|
41 |
val endOfStream = end_of_stream |
|
42 |
val output = output |
|
43 |
val flushOut = flush_out |
|
44 |
end; |