unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Joshua Branson via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 51383@debbugs.gnu.org
Subject: bug#51383: noobie way of incorrectly using (guix records)
Date: Mon, 25 Oct 2021 02:15:54 -0400	[thread overview]
Message-ID: <87zgqxiq91.fsf@dismail.de> (raw)

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




             reply	other threads:[~2021-10-25  6:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  6:15 Joshua Branson via Bug reports for GNU Guix [this message]
2021-10-25  7:48 ` bug#51383: noobie way of incorrectly using (guix records) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgqxiq91.fsf@dismail.de \
    --to=bug-guix@gnu.org \
    --cc=51383@debbugs.gnu.org \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).