spec.scm 687 B

123456789101112131415161718192021222324
  1. ;;; Copyright 2022 Andrew Whatson
  2. (define-module (language prescheme spec)
  3. #:use-module (system base language)
  4. #:use-module (language scheme compile-tree-il)
  5. #:use-module (language scheme decompile-tree-il))
  6. (define (reader port env)
  7. (read-syntax port))
  8. (define (default-environment)
  9. (let ((m (make-module)))
  10. (module-use! m (resolve-interface '(language prescheme core)))
  11. m))
  12. (define-language prescheme
  13. #:title "Pre-Scheme"
  14. #:reader reader
  15. #:printer write
  16. #:compilers `((tree-il . ,compile-tree-il))
  17. #:decompilers `((tree-il . ,decompile-tree-il))
  18. #:evaluator (lambda (x module) (primitive-eval x))
  19. #:make-default-environment default-environment)