PreviousUpNext

14.4.64  Pure_Io

The standard library Pure_Io api defines access to “pure” (side-effect free) input. (No attempt is made to implement pure output.)

Implementations of Pure_Io may be generated using binary_io_g and text_io_g from respectively src/lib/std/src/io/binary-io-g.pkg and src/lib/std/src/io/file-g.pkg.

Predefined packages generated by those two include the standard library file and binary_io packages.

The Pure_Io api source code is in src/lib/std/src/io/pure-io.api.

See also: Threadkit_Pure_Io.

See also: pio ("pure_io").

See also: Imperative_Io.

The above information is manually maintained and may contain errors.

api {
    Vector ;
    Element ;
    Reader ;
    Writer ;
    Input_Stream ;
    Output_Stream ;
    File_Position ;
    Out_Position ;
    make_instream : (Reader , Vector) -> Input_Stream;
    read : Input_Stream -> (Vector , Input_Stream);
    read_one : Input_Stream -> Null_Or(((Element , Input_Stream)) );
    read_n : (Input_Stream , Int) -> (Vector , Input_Stream);
    read_all : Input_Stream -> (Vector , Input_Stream);
    can_read : (Input_Stream , Int) -> Null_Or(Int );
    close_input : Input_Stream -> Void;
    end_of_stream : Input_Stream -> Bool;
    get_reader : Input_Stream -> (Reader , Vector);
    file_position_in : Input_Stream -> File_Position;
    make_outstream : (Writer , io_exceptions::Buffering) -> Output_Stream;
    write : (Output_Stream , Vector) -> Void;
    write_one : (Output_Stream , Element) -> Void;
    flush : Output_Stream -> Void;
    close_output : Output_Stream -> Void;
    set_buffer_mode : (Output_Stream , io_exceptions::Buffering) -> Void;
    get_buffer_mode : Output_Stream -> io_exceptions::Buffering;
    get_writer : Output_Stream -> (Writer , io_exceptions::Buffering);
    file_pos_out : Out_Position -> File_Position;
    get_output_position : Output_Stream -> Out_Position;
    set_output_position : Out_Position -> Void;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext