Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

extract redefine-warning

  • Loading branch information...
commit 721385b665faa06c6add6729af2208f194588a03 1 parent d3dc5ee
@awwx authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 arc.arc
View
12 arc.arc
@@ -3,13 +3,17 @@
(assign do (annotate 'mac
(fn args `((fn () ,@args)))))
+(assign redefine-warning
+ (fn (var)
+ (if (bound var)
+ (do (ar-disp "*** redefining " (racket-current-error-port))
+ (ar-disp var (racket-current-error-port))
+ (ar-disp #\newline (racket-current-error-port))))))
+
(assign safeset
(annotate 'mac
(fn (var val)
- `(do (if (bound ',var)
- (do (ar-disp "*** redefining " (racket-current-error-port))
- (ar-disp ',var (racket-current-error-port))
- (ar-disp #\newline (racket-current-error-port))))
+ `(do (redefine-warning ',var)
(assign ,var ,val)))))
(assign assign-fn
Please sign in to comment.
Something went wrong with that request. Please try again.