This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
guile-prescheme/prescheme/scheme48.scm
2022-07-19 17:30:12 +10:00

39 lines
1 KiB
Scheme

;;; Copyright 2022 Andrew Whatson
;;;
;;; Minimal Scheme48 compatibility layer for Pre-Scheme on Guile.
;;;
(define-module (prescheme scheme48)
#:use-module (srfi srfi-8)
#:use-module (srfi srfi-60)
#:use-module (rnrs bytevectors)
#:use-module (prescheme s48-defenum)
#:export (arithmetic-shift
ascii->char
char->ascii
unspecific
make-code-vector
code-vector-ref
code-vector-set!
code-vector-length)
#:re-export (define-enumeration
enum
name->enumerand
enumerand->name
bitwise-and
bitwise-ior
bitwise-xor
bitwise-not
receive))
(define arithmetic-shift ash)
(define ascii->char integer->char)
(define char->ascii char->integer)
(define unspecific (if #f #f))
(define make-code-vector make-bytevector)
(define code-vector-ref bytevector-u8-ref)
(define code-vector-set! bytevector-u8-set!)
(define code-vector-length bytevector-length)