moduleFT.scm 1.1 KB

123456789101112131415161718192021222324252627282930
  1. ;; This module should be compiled with --full-tailcalls.
  2. ;(module-static #t)
  3. (define-syntax no-warn
  4. (syntax-rules ()
  5. ((no_warn exp)
  6. (with-compile-options warn-invoke-unknown-method: #f exp))))
  7. ;; Bug reported 2005-05-08 by dominique.boucher@nuecho.com.
  8. (define (neg-abs x)
  9. (if (< x 0)
  10. x
  11. (- x)))
  12. ;; A number of tests for names containing colons.
  13. (define prefix-test :: <pair> (list 1))
  14. (define prefix-test:var2 :: <pair> (list 2))
  15. (set-car! prefix-test (+ prefix-test:car 10))
  16. ;; The syntax prefix-test:var2:car works but is not supported.
  17. (set-car! prefix-test:var2 (+ prefix-test:var2:car 10))
  18. (define prefix-test:var2:var3 (list 3))
  19. (set-car! prefix-test:var2:var3 (no-warn (+ prefix-test:var2:var3:car 10)))
  20. (define prefix-test:filler:var4 (list 4))
  21. (set-car! prefix-test:filler:var4 (no-warn (+ prefix-test:filler:var4:car 10)))
  22. (define prefix-test-list
  23. (list (cons 'prefix-test prefix-test)
  24. (cons 'prefix-test:var2 prefix-test:var2)
  25. (cons 'prefix-test:var2:var3 prefix-test:var2:var3)
  26. (cons 'prefix-test:filler:var4 prefix-test:filler:var4)))