#lang racket/base
(require racket/include
         racket/unsafe/ops
         racket/flonum
         racket/fixnum
         '#%foreign
         (only-in '#%kernel open-input-file)
         (only-in '#%paramz
                  parameterization-key
                  extend-parameterization
                  break-enabled-key
                  check-for-break)
         (only-in '#%linklet
                  primitive-table))

(provide (rename-out
          (1/build-path/convention-type build-path/convention-type)
          (1/peek-bytes! peek-bytes!)
          (1/explode-path explode-path)
          (1/peek-byte peek-byte)
          (1/write write)
          (1/fprintf fprintf)
          (1/write-bytes-avail write-bytes-avail)
          (1/open-output-bytes open-output-bytes)
          (1/open-input-file open-input-file)
          (1/write-bytes-avail* write-bytes-avail*)
          (1/path-element->string path-element->string)
          (1/simplify-path simplify-path)
          (1/bytes->string/locale bytes->string/locale)
          (1/error error)
          (1/current-input-port current-input-port)
          (1/path->directory-path path->directory-path)
          (1/read-bytes-avail!* read-bytes-avail!*)
          (1/make-pipe make-pipe)
          (1/write-string write-string)
          (1/bytes->path bytes->path)
          (1/path<? path<?)
          (1/open-input-bytes open-input-bytes)
          (1/read-string! read-string!)
          (1/string-port? string-port?)
          (1/string->bytes/latin-1 string->bytes/latin-1)
          (is-path? path?)
          (1/bytes->string/utf-8 bytes->string/utf-8)
          (1/path->bytes path->bytes)
          (1/format format)
          (1/newline newline)
          (1/string->bytes/utf-8 string->bytes/utf-8)
          (1/string->bytes/locale string->bytes/locale)
          (1/read-bytes read-bytes)
          (pipe-input-port? pipe-input-port?)
          (1/string->path-element string->path-element)
          (1/peek-char peek-char)
          (1/absolute-path? absolute-path?)
          (1/path-convention-type path-convention-type)
          (1/path->complete-path path->complete-path)
          (1/bytes-utf-8-length bytes-utf-8-length)
          (1/cleanse-path cleanse-path)
          (1/peek-string peek-string)
          (1/write-bytes-avail/enable-break write-bytes-avail/enable-break)
          (1/display display)
          (1/read-char read-char)
          (1/make-output-port make-output-port)
          (1/bytes->path-element bytes->path-element)
          (1/complete-path? complete-path?)
          (1/build-path build-path)
          (1/relative-path? relative-path?)
          (1/path-for-some-system? path-for-some-system?)
          (1/open-input-string open-input-string)
          (1/string->path string->path)
          (1/close-input-port close-input-port)
          (1/current-error-port current-error-port)
          (1/write-bytes write-bytes)
          (1/prop:custom-write prop:custom-write)
          (1/read-bytes-avail! read-bytes-avail!)
          (1/peek-string! peek-string!)
          (1/string-utf-8-length string-utf-8-length)
          (pipe-output-port? pipe-output-port?)
          (1/print print)
          (1/read-byte read-byte)
          (1/make-input-port make-input-port)
          (1/port-next-location port-next-location)
          (1/path-element->bytes path-element->bytes)
          (1/split-path split-path)
          (1/printf printf)
          (1/read-string read-string)
          (1/bytes->string/latin-1 bytes->string/latin-1)
          (1/port-count-lines! port-count-lines!)
          (1/path->string path->string)
          (1/current-output-port current-output-port)
          (1/peek-bytes-avail! peek-bytes-avail!)
          (1/pipe-content-length pipe-content-length)
          (1/peek-bytes-avail!* peek-bytes-avail!*)
          (1/read-bytes! read-bytes!)
          (1/peek-bytes peek-bytes)
          (1/close-output-port close-output-port)
          (1/open-output-string open-output-string)))

(define-syntax-rule (linklet () (ex ...) body ...)
  (begin body ...))

(include "../../io/compiled/io.rktl")
