mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
records: "options" → "properties".
* guix/records.scm (define-record-type*): Change "options" to "properties".
This commit is contained in:
parent
faef3b6a96
commit
792798f486
1 changed files with 7 additions and 7 deletions
|
@ -196,8 +196,8 @@ (define (field-default-value s)
|
||||||
(syntax-case s (default)
|
(syntax-case s (default)
|
||||||
((field (default val) _ ...)
|
((field (default val) _ ...)
|
||||||
(list #'field #'val))
|
(list #'field #'val))
|
||||||
((field _ options ...)
|
((field _ properties ...)
|
||||||
(field-default-value #'(field options ...)))
|
(field-default-value #'(field properties ...)))
|
||||||
(_ #f)))
|
(_ #f)))
|
||||||
|
|
||||||
(define-field-property-predicate delayed-field? delayed)
|
(define-field-property-predicate delayed-field? delayed)
|
||||||
|
@ -210,7 +210,7 @@ (define (wrapped-field-accessor-name field)
|
||||||
;; Return the name (an unhygienic syntax object) of the "real"
|
;; Return the name (an unhygienic syntax object) of the "real"
|
||||||
;; getter for field, which is assumed to be a wrapped field.
|
;; getter for field, which is assumed to be a wrapped field.
|
||||||
(syntax-case field ()
|
(syntax-case field ()
|
||||||
((field get options ...)
|
((field get properties ...)
|
||||||
(let* ((getter (syntax->datum #'get))
|
(let* ((getter (syntax->datum #'get))
|
||||||
(real-getter (symbol-append '% getter '-real)))
|
(real-getter (symbol-append '% getter '-real)))
|
||||||
(datum->syntax #'get real-getter)))))
|
(datum->syntax #'get real-getter)))))
|
||||||
|
@ -219,7 +219,7 @@ (define (field-spec->srfi-9 field)
|
||||||
;; Convert a field spec of our style to a SRFI-9 field spec of the
|
;; Convert a field spec of our style to a SRFI-9 field spec of the
|
||||||
;; form (field get).
|
;; form (field get).
|
||||||
(syntax-case field ()
|
(syntax-case field ()
|
||||||
((name get options ...)
|
((name get properties ...)
|
||||||
#`(name
|
#`(name
|
||||||
#,(if (wrapped-field? field)
|
#,(if (wrapped-field? field)
|
||||||
(wrapped-field-accessor-name field)
|
(wrapped-field-accessor-name field)
|
||||||
|
@ -247,12 +247,12 @@ (define (delayed-field-accessor-definition field)
|
||||||
|
|
||||||
(syntax-case s ()
|
(syntax-case s ()
|
||||||
((_ type syntactic-ctor ctor pred
|
((_ type syntactic-ctor ctor pred
|
||||||
(field get options ...) ...)
|
(field get properties ...) ...)
|
||||||
(let* ((field-spec #'((field get options ...) ...))
|
(let* ((field-spec #'((field get properties ...) ...))
|
||||||
(thunked (filter-map thunked-field? field-spec))
|
(thunked (filter-map thunked-field? field-spec))
|
||||||
(delayed (filter-map delayed-field? field-spec))
|
(delayed (filter-map delayed-field? field-spec))
|
||||||
(defaults (filter-map field-default-value
|
(defaults (filter-map field-default-value
|
||||||
#'((field options ...) ...))))
|
#'((field properties ...) ...))))
|
||||||
(with-syntax (((field-spec* ...)
|
(with-syntax (((field-spec* ...)
|
||||||
(map field-spec->srfi-9 field-spec))
|
(map field-spec->srfi-9 field-spec))
|
||||||
((thunked-field-accessor ...)
|
((thunked-field-accessor ...)
|
||||||
|
|
Loading…
Reference in a new issue