package-defs.scm 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. (define-structures ((prescheme prescheme-interface)
  3. (ps-memory ps-memory-interface)
  4. (memory-debug (export reinitialize-memory))
  5. (ps-receive ps-receive-interface)
  6. (external-constants (export make-external-constant
  7. external-constant?
  8. external-constant-enum-name
  9. external-constant-name
  10. external-constant-c-string)))
  11. (open (modify scheme (rename (open-input-file scheme:open-input-file)
  12. (open-output-file scheme:open-output-file)
  13. (close-input-port scheme:close-input-port)
  14. (close-output-port scheme:close-output-port)
  15. (read-char scheme:read-char)
  16. (peek-char scheme:peek-char)))
  17. (subset i/o (byte-ready? read-byte peek-byte write-byte))
  18. code-vectors bitwise ascii primitives signals enumerated
  19. platform
  20. define-record-types
  21. bigbit) ; make sure that bignum bitwise operations are loaded
  22. (optimize auto-integrate)
  23. (files ps-defenum prescheme memory))
  24. (define-structure ps-record-types (export define-record-type)
  25. (open scheme (modify define-record-types (prefix s48:)))
  26. (begin
  27. (define-syntax define-record-type
  28. (syntax-rules ()
  29. ((define-record-type name type-name
  30. constructor
  31. (field type more ...) ...)
  32. (s48:define-record-type name type-name
  33. constructor
  34. (field more ...) ...))))))
  35. (define-structure ps-flonums ps-flonums-interface
  36. (open scheme)
  37. (optimize auto-integrate)
  38. (begin
  39. (define fl+ +) (define fl- -) (define fl* *) (define fl/ /)
  40. (define fl= =)
  41. (define fl< <) (define fl> >)
  42. (define fl<= <=) (define fl>= >=)))
  43. (define-structure ps-unsigned-integers ps-unsigned-integers-interface
  44. (open scheme)
  45. (optimize auto-integrate)
  46. (begin
  47. (define un+ +) (define un- -) (define un* *)
  48. (define unquotient quotient)
  49. (define unremainder remainder)
  50. (define un= =)
  51. (define un< <) (define un> >)
  52. (define un<= <=) (define un>= >=)
  53. (define (unsigned->integer x) x)
  54. (define (integer->unsigned x) x)
  55. ))
  56. ;(define-structure byte-vectors byte-vector-interface
  57. ; (open scheme code-vectors)
  58. ; (optimize auto-integrate)
  59. ; (files byte-vector))
  60. ;
  61. ;(define-interface byte-vector-interface
  62. ; (export make-byte-vector
  63. ; byte-vector?
  64. ; byte-vector-ref byte-vector-set!
  65. ; signed-byte-vector-ref signed-byte-vector-set!
  66. ; byte-vector-ref32 byte-vector-set32!
  67. ; signed-byte-vector-ref32 signed-byte-vector-set32!))
  68. ;
  69. ;(define-structure xmemory ps-memory-interface
  70. ; (open scheme byte-vectors signals enumerated bitwise)
  71. ; (files simple-memory))