aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2023-06-04 09:47:36 +0200
committerJosselin Poiret <dev@jpoiret.xyz>2023-06-04 10:59:28 +0200
commitf045c7ac80d36777f885e8ecab7affcb2683eb36 (patch)
treedf01f9276a601a224d409da7438eb2cee3ebe73a
parent4cd529362108086eeec25d4d465261415cff45b3 (diff)
downloadguix-f045c7ac80d36777f885e8ecab7affcb2683eb36.tar.gz
guix-f045c7ac80d36777f885e8ecab7affcb2683eb36.zip
records: match-record: Do not show internal form.
* guix/records.scm (lookup-field+wrapper): Attach source properties to the field syntax object instead.
-rw-r--r--guix/records.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/records.scm b/guix/records.scm
index 2a88cb4b3c..6c9f29eb3e 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -599,7 +599,8 @@ to thunked values. Raise a syntax violation when the field is not found."
((_ record field offset ())
(syntax-violation 'match-record
"unknown record type field"
- s #'field))
+ ;; Attach the local source data to the field.
+ (datum->syntax #f (syntax->datum #'field) #:source s)))
((_ record field offset ((head normal) tail ...))
(free-identifier=? #'field #'head)
#'(values offset identity))