unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51383: noobie way of incorrectly using (guix records)
@ 2021-10-25  6:15 Joshua Branson via Bug reports for GNU Guix
  2021-10-25  7:48 ` zimoun
  2021-10-27 18:00 ` bug#51383: (no subject) Joshua Branson
  0 siblings, 2 replies; 5+ messages in thread
From: Joshua Branson via Bug reports for GNU Guix @ 2021-10-25  6:15 UTC (permalink / raw)
  To: 51383

So I made a pretty noobie-like mistake a few minutes ago.  When one
tries to make a (record-configuration), he invariably create an
infinite number of records.  The guile compiler eventually runs out
of memory and stops compiling.

(use-modules (guix records))

(define-record-type* <record-configuration>
  record-configuration make-record-configuration
  record-configuration?
  (command record-configuration-command
           ;; the error is here is on the next line
           (default (record-configuration))))  

(record-configuration)


This is not possible with (srfi sfri-9)


(use-modules (srfi srfi-9))

(define-record-type <employee>
  (make-employee name age (make-employeee 5 5 5))
  employee?
  (name    employee-name)
  (age     employee-age    set-employee-age!)
  (salary  employee-salary set-employee-salary!))

(make-employee)


The above results in a syntax error.


Is this a "feature" and not a bug?  I feel like this is a trivial bug,
and I am certain that other bugs are of greater importance.

Thanks,

Joshua




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-27 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  6:15 bug#51383: noobie way of incorrectly using (guix records) Joshua Branson via Bug reports for GNU Guix
2021-10-25  7:48 ` zimoun
2021-10-25  9:36   ` Joshua Branson via Bug reports for GNU Guix
2021-10-25 11:21     ` zimoun
2021-10-27 18:00 ` bug#51383: (no subject) Joshua Branson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).