bug-guix
[Top][All Lists]
Advanced

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

bug#51383: noobie way of incorrectly using (guix records)


From: Joshua Branson
Subject: bug#51383: noobie way of incorrectly using (guix records)
Date: Mon, 25 Oct 2021 02:15:54 -0400

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 via email to

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