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