mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Currently a package's cond-expand contains the symbol of the target implementation and optionally more from config file. Execute a command (once) on target implementation to add their full feature list, making it available for each package to use. All of these Schemes are tested. Larceny is just too annoying to get the feature list (no one-liner, and it could take a while) so Larceny stays the current behavior. There is a small unrelated change here: the gosh command to get version. We don't need to call (exit), if stdin is closed properly (it should) then gosh should exit regardless.
35 lines
1.1 KiB
Scheme
35 lines
1.1 KiB
Scheme
|
|
(define-library (chibi snow utils)
|
|
(export find-in-path find-sexp-in-path
|
|
write-to-string display-to-string
|
|
resource->bytevector uri-normalize uri-directory
|
|
version-split version-compare version>? version>=?
|
|
topological-sort
|
|
known-implementations impl->version impl->features)
|
|
(import (scheme base)
|
|
(scheme char)
|
|
(scheme file)
|
|
(scheme lazy)
|
|
(scheme read)
|
|
(scheme write)
|
|
(scheme process-context)
|
|
(srfi 1)
|
|
(chibi config)
|
|
(chibi char-set)
|
|
(chibi net http)
|
|
(chibi pathname)
|
|
(chibi process)
|
|
(chibi string)
|
|
(chibi uri))
|
|
(cond-expand
|
|
(chibi (import (chibi io)))
|
|
(chicken
|
|
(begin
|
|
(define (port->bytevector in) (read-bytevector #f in))
|
|
(define (file->bytevector in)
|
|
(call-with-input-file in port->bytevector))
|
|
(define (call-with-output-string proc)
|
|
(let ((out (open-output-string)))
|
|
(proc out)
|
|
(get-output-string out))))))
|
|
(include "utils.scm"))
|