summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2020-09-22 20:27:49 +0200
committerpukkamustard <pukkamustard@posteo.net>2020-09-22 20:27:49 +0200
commitf5426dae26abb42524f0250776f008229b8a3ba9 (patch)
tree95cfffc32bc45f346901317ebfbd5ea626051383
parentc8300cf0e439ca0a426d3175f3fa2a5479d91e27 (diff)
(schemantic lvar): use gensym for lvar names (if none other provided)
-rw-r--r--schemantic/lvar.scm10
1 files changed, 3 insertions, 7 deletions
diff --git a/schemantic/lvar.scm b/schemantic/lvar.scm
index 593d3d7..1e63134 100644
--- a/schemantic/lvar.scm
+++ b/schemantic/lvar.scm
@@ -16,17 +16,13 @@
;; Logical Variable
(define-class <lvar> (<term>)
- (name #:init-keyword #:name #:init-value #f #:getter lvar-name))
+ (name #:init-keyword #:name #:init-form (gensym "lvar") #:getter lvar-name))
(define-method (write (self <lvar>) port)
- (if (lvar-name self)
- (format port "?~a" (lvar-name self))
- (format port "?~x" (object-address self))))
+ (format port "?~a" (lvar-name self)))
(define-method (equal? (x <lvar>) (y <lvar>))
- (if (and (lvar-name x) (lvar-name y))
- (equal? (lvar-name x) (lvar-name y))
- (next-method)))
+ (equal? (lvar-name x) (lvar-name y)))
(define lvar
(case-lambda