summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/records.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/records.scm b/guix/records.scm
index e60732dd43..cd887b77ce 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -69,6 +69,14 @@ thunked fields."
field+value)
car))
+ ;; Make sure there are no unknown field names.
+ (let* ((fields (map (compose car syntax->datum)
+ field+value))
+ (unexpected (lset-difference eq? fields 'expected)))
+ (when (pair? unexpected)
+ (record-error 'name s "extraneous field initializers ~a"
+ unexpected)))
+
#`(make-struct type 0
#,@(map (lambda (field index)
(or (field-inherited-value field)