Hi,
Olivier Dion via General Guile related discussions
skribis:
> In the module (guix records), there's some very nice syntax rule
> `define-record-type*` that allows very powerfull declarative style of
> records
) which no longer exists in Guix, they
use guile-json instead.
Then (define-json-type) is based on (define-json-mapping), but yes all of
this is available in guile-json.
> >
> > It would be fantastic to combine (guix records) and guile-json somehow,
> but
> > I'm not sure how.
>
&
Taylan Kammer writes:
>>>(import (rnrs records syntactic (6)))
>>>(define-record-type (cat make-cat cat?) (fields name age color))
>> I did not know about that shorthand — thank you!
>> I always did this:
>> (import (srfi srfi-9))
>> (define-record-type
>>(make-cat name age color)
>
On 10.02.2021 02:02, Dr. Arne Babenhauserheide wrote:
Taylan Kammer writes:
The most feature-rich record system supported by Guile is probably the
R6RS record system, which is available through the modules:
(rnrs records syntactic (6))
(rnrs records procedural (6))
(rnrs records insp
Taylan Kammer writes:
> The most feature-rich record system supported by Guile is probably the
> R6RS record system, which is available through the modules:
>
> (rnrs records syntactic (6))
> (rnrs records procedural (6))
> (rnrs records inspection (6))
> Here's a super brief example usage
t; (name "Foo")
> (profession "Teacher")))
>
> instead of:
>
> (employee->json
>(scm->employee
> '((age . 30)
> (name . "Foo")
> (profession . "Teacher"
>
> It would be fantast
(profession . "Teacher"
It would be fantastic to combine (guix records) and guile-json somehow, but
I'm not sure how.
Sorry I couldn't provide any useful insight.
Best,
Aleix
On Fri, Feb 5, 2021 at 9:24 AM Olivier Dion via General Guile related
discussions wrote:
> He
On 05.02.2021 17:51, Olivier Dion via General Guile related discussions
wrote:
Hello,
In the module (guix records), there's some very nice syntax rule
`define-record-type*` that allows very powerfull declarative style of
records. For ex
Hello,
In the module (guix records), there's some very nice syntax rule
`define-record-type*` that allows very powerfull declarative style of
records. For example:
--
(employee
(age 30)
(name "Foo")
(prof