Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 2002-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | functor TextIOConvert | |
9 | (structure TextIO: TEXT_IO) : | |
10 | TEXT_IO_1997 = | |
11 | struct | |
12 | open TextIO | |
13 | ||
14 | fun inputLine ins = | |
15 | case TextIO.inputLine ins of | |
16 | NONE => "" | |
17 | | SOME s => s | |
18 | ||
19 | structure StreamIO = | |
20 | struct | |
21 | open StreamIO | |
22 | ||
23 | val inputAll = #1 o inputAll | |
24 | ||
25 | fun inputLine ins = | |
26 | case StreamIO.inputLine ins of | |
27 | NONE => ("", ins) | |
28 | | SOME (s, ins) => (s, ins) | |
29 | end | |
30 | end |