Re: Guix records

2021-02-26 Thread Ludovic Courtès
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

Re: Guix records

2021-02-10 Thread Aleix Conchillo Flaqué
) 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. > &

Re: Guix records

2021-02-10 Thread Dr. Arne Babenhauserheide
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) >

Re: Guix records

2021-02-09 Thread Taylan Kammer
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

Re: Guix records

2021-02-09 Thread Dr. Arne Babenhauserheide
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

Re: Guix records

2021-02-09 Thread Olivier Dion via General Guile related discussions
t; (name "Foo") > (profession "Teacher"))) > > instead of: > > (employee->json >(scm->employee > '((age . 30) > (name . "Foo") > (profession . "Teacher" > > It would be fantast

Re: Guix records

2021-02-09 Thread Aleix Conchillo Flaqué
(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

Re: Guix records

2021-02-09 Thread Taylan Kammer
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

Guix records

2021-02-05 Thread Olivier Dion via General Guile related discussions
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