Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / basis-library / io / bin-io.sml
1 (* Copyright (C) 2002-2006, 2008 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 structure BinIO: BIN_IO_EXTRA =
9 ImperativeIOExtra
10 (structure Array = Word8Array
11 structure ArraySlice = Word8ArraySlice
12 structure PrimIO = BinPrimIO
13 structure Vector = Word8Vector
14 structure VectorSlice = Word8VectorSlice
15 val chunkSize = Int32.toInt (Primitive.Controls.bufSize)
16 val fileTypeFlags = [PrimitiveFFI.Posix.FileSys.O.BINARY]
17 val line = NONE
18 val mkReader = Posix.IO.mkBinReader
19 val mkWriter = Posix.IO.mkBinWriter
20 val someElem = 0wx0: Word8.word
21 val xlatePos = SOME {fromInt = fn i => i,
22 toInt = fn i => i})