records: match-record: Do not show internal form.

* guix/records.scm (lookup-field+wrapper): Attach source properties to the
field syntax object instead.
This commit is contained in:
Josselin Poiret 2023-06-04 09:47:36 +02:00
parent 4cd5293621
commit f045c7ac80
No known key found for this signature in database
GPG key ID: 505E40B916171A8A

View file

@ -599,7 +599,8 @@ (define-syntax lookup-field+wrapper
((_ 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))