[plt-scheme] Match with struct field setters in modules

From: Alexander Friedman (alex at inga.mit.edu)
Date: Fri Aug 26 15:02:55 EDT 2005

doesn't seem to work.

In 299.200 :

(module works mzscheme
  (define-struct s (f))

  (require (lib "match.ss"))
  
  (display
   (match (make-s 2)
     [($ s f)
      f]))
  (newline))

(require works)

> 2 

(module breaks mzscheme
  
  (define-struct s (f))

  (require (lib "match.ss"))

  (match (make-s 2)
    [($ s (and f (set! set-f!)))
     (set-f! 3)]))

> compile: unbound variable in module in: set-s-f!

If you do this at the top level, it works ok.

Am I missing something obvious here? 

-- 


-Alex



Posted on the users mailing list.