guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

10/26: records: match-record: Do not show internal form.


From: guix-commits
Subject: 10/26: records: match-record: Do not show internal form.
Date: Sun, 4 Jun 2023 05:38:32 -0400 (EDT)

jpoiret pushed a commit to branch master
in repository guix.

commit f045c7ac80d36777f885e8ecab7affcb2683eb36
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Sun Jun 4 09:47:36 2023 +0200

    records: match-record: Do not show internal form.
    
    * guix/records.scm (lookup-field+wrapper): Attach source properties to the
    field syntax object instead.
---
 guix/records.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]