Skip to content
Snippets Groups Projects
Commit 77189610 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Minor cleanup of object macros.

parent 88eb3ee0
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
:use-module (rnrs base) :use-module (rnrs base)
:use-module (oop goops) :use-module (oop goops)
:use-module (dns internal util) :use-module (dns internal util)
:use-module ((srfi srfi-1) :select (filter-map))
:use-module (srfi srfi-88) :use-module (srfi srfi-88)
;; Define-record-type exported and not #:replace:d, since we want a warning if ;; Define-record-type exported and not #:replace:d, since we want a warning if
;; multiple instances of it is imported at once. ;; multiple instances of it is imported at once.
...@@ -67,8 +68,7 @@ ...@@ -67,8 +68,7 @@
((name arg args ...) ((name arg args ...)
(inner #'(name args ...))) (inner #'(name args ...)))
;; Case when no #:type annotation exists. ;; Case when no #:type annotation exists.
;; Should hopefully be optimized away by the compiler (_ #f)))
(_ #'(if #f #f))))
inner) inner)
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
;; construct public-facing constructor ;; construct public-facing constructor
(define* (make-<type> key: #,@(map handle-define*-clause #'(field ...))) (define* (make-<type> key: #,@(map handle-define*-clause #'(field ...)))
#,@(map (handle-validator (symbol->string (syntax->datum #'make-<type>))) #,@(filter-map (handle-validator (symbol->string (syntax->datum #'make-<type>)))
#'(field ...)) #'(field ...))
;; bind all values to object ;; bind all values to object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment