 : stream-read-partial ( n stream -- seq/f )
     [ stream-read-partial-unsafe ] (read-into-new) ; inline
 
-: read ( n -- seq ) input-stream get stream-read ;
-: read-partial ( n -- seq ) input-stream get stream-read-partial ;
+: read ( n -- seq ) input-stream get stream-read ; inline
+: read-partial ( n -- seq ) input-stream get stream-read-partial ; inline
 
 : each-stream-line ( ... stream quot: ( ... line -- ... ) -- ... )
     swap [ stream-readln ] curry each-morsel ; inline

SYMBOL: output-stream
SYMBOL: error-stream

: readln ( -- str/f ) input-stream get stream-readln ;
: read1 ( -- elt ) input-stream get stream-read1 ;
: read-until ( seps -- seq sep/f ) input-stream get stream-read-until ;
: tell-input ( -- n ) input-stream get stream-tell ;
: tell-output ( -- n ) output-stream get stream-tell ;
: seek-input ( n seek-type -- ) input-stream get stream-seek ;
: seek-output ( n seek-type -- ) output-stream get stream-seek ;

: write1 ( elt -- ) output-stream get stream-write1 ;
: write ( seq -- ) output-stream get stream-write ;
: flush ( -- ) output-stream get stream-flush ;

: nl ( -- ) output-stream get stream-nl ;

: with-input-stream* ( stream quot -- )
    input-stream swap with-variable ; inline

    #! buffer before closing the FD.
    swapd [ with-output-stream ] curry with-input-stream ; inline

: print ( str -- ) output-stream get stream-print ; inline

: bl ( -- ) " " write ;

