PreviousUpNext

14.4.98  Threadkit_Pure_Io

The standard library Threadkit_Pure_Io api extends the Mythryl Pure_Io interface with event-valued operations. It defines access to “pure” (side-effect free) input for multithreaded Mythryl programs. (No attempt is made to implement pure output.)

The Threadkit_Pure_Io api is a sub-api of the Threadkit_Imperative_Io api.

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 Threadkit_Pure_Io api source code is in src/lib/std/src/io/threadkit-pure-io.api.

See also: Threadkit_Text_Pure_Io.

See also: Pure_Io.

See also: pio ("pure_io").

See also: Imperative_Io.

The above information is manually maintained and may contain errors.

api {
    Vector ;
    Element ;
    Stream_Reader ;
    Stream_Writer ;
    Input_Stream ;
    Output_Stream ;
    File_Position ;
    Out_Position ;
    make_instream : (Stream_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 -> (Stream_Reader , Vector);
    file_position_in : Input_Stream -> File_Position;
    make_outstream : (Stream_Writer , io_exceptions::Buffering_Mode)
                     -> Output_Stream;
    write : (Output_Stream , Vector) -> Void;
    write_one : (Output_Stream , Element) -> Void;
    flush : Output_Stream -> Void;
    close_output : Output_Stream -> Void;
    set_buffering_mode : (Output_Stream , io_exceptions::Buffering_Mode) -> Void;
    get_buffering_mode : Output_Stream -> io_exceptions::Buffering_Mode;
    get_writer : Output_Stream
                 -> (Stream_Writer , io_exceptions::Buffering_Mode);
    file_pos_out : Out_Position -> File_Position;
    get_output_position : Output_Stream -> Out_Position;
    set_output_position : Out_Position -> Void;
    input1evt : Input_Stream
                -> Mailop(Null_Or(((Element , Input_Stream)) ) );
    input_nevt : (Input_Stream , Int)
                 -> Mailop(((Vector , Input_Stream)) );
    input_mailop : Input_Stream -> Mailop(((Vector , Input_Stream)) );
    input_all_mailop : Input_Stream -> Mailop(((Vector , Input_Stream)) );
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext