Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / basis-library / io / io.sml
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9structure IO: IO =
10 struct
11 exception BlockingNotSupported
12
13 exception ClosedStream
14
15 exception Io of {cause : exn,
16 function : string,
17 name : string}
18
19 val _ =
20 General.addExnMessager
21 (fn e =>
22 case e of
23 Io {cause, function, name, ...} =>
24 SOME (concat ["Io: ", function, " \"", name, "\" failed with ",
25 exnMessage cause])
26 | _ => NONE)
27
28 exception NonblockingNotSupported
29
30 exception RandomAccessNotSupported
31
32 datatype buffer_mode = NO_BUF | LINE_BUF | BLOCK_BUF
33 end