[plt-scheme] Case Sensitivity With Macros in Modules.

From: Matt Jadud (mjadud at cs.indiana.edu)
Date: Sun Jul 7 11:44:18 EDT 2002

	I believe your problem will be fixed with the addition of a #cs before
the module form.

> #cs(module sym mzscheme
  (provide (all-defined))

  (define-syntax print-symbols
    (syntax-rules ()
                  ((_ s1 s2)
                   (display (string-append
                             "S1: "
                             (symbol->string 's1)
                             " S2: "
                             (symbol->string 's2)
                             "\n")))))

  (define-syntax sym->string
    (syntax-rules ()
                  ((_ sym)
                   (print-symbols sym Bar)))))
> (sym->string Foo)
reference to undefined identifier: sym->string
> (require sym)
> (sym->string Foo) ;;Note the REPL isn't case sensitive at this point...
S1: foo S2: Bar
> (read-case-sensitive #t)  ;;AhHa!
> (sym->string Foo)
S1: Foo S2: Bar
>

	Matt

	(who ran into the same thing a while back; I think Matthew updated the
docs to reflect this under Modules, where many other Interesting Things can be
learned as well.)




Posted on the users mailing list.