#| -*-Scheme-*-
-$Id: cleanup.scm,v 1.24 1995/08/10 19:21:58 adams Exp $
+$Id: cleanup.scm,v 1.25 1995/09/05 19:14:35 adams Exp $
Copyright (c) 1994-1995 Massachusetts Institute of Technology
(define-commutative-cleanup-rewrite fix:xor)
(define-commutative-cleanup-rewrite fix:+ +)
(define-commutative-cleanup-rewrite fix:* *))
+
+(define-cleanup-rewrite 'STRING->SYMBOL 1
+ (lambda (expr)
+ (let ((value (form/number? expr)))
+ (and (QUOTE/? expr)
+ (string? (quote/test expr))
+ `(QUOTE ,(string->symbol (quote/text expr)))))))
\f
;;
(let ((NOT-primitive (make-primitive-procedure 'NOT)))