guix-devel
[Top][All Lists]
Advanced

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

Re: Change defaults of 'define-record-type*' need invalidate auto-compil


From: 宋文武
Subject: Re: Change defaults of 'define-record-type*' need invalidate auto-compilation caches
Date: Sat, 06 Jan 2018 23:07:39 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

> Hello,

Send it by mistake...


For example, in the current directory, I have 'foo.scm':
--8<---------------cut here---------------start------------->8---
(define-module (foo)
  #:use-module (guix records)
  #:export (foo foo-x))

(define-record-type* <foo>
  foo make-foo foo?
  (x foo-x (default "x")))
--8<---------------cut here---------------end--------------->8---


And 'x.scm':
--8<---------------cut here---------------start------------->8---
(use-modules (foo))
(display (foo-x (foo)))
--8<---------------cut here---------------end--------------->8---


Run 'guile -L . x.scm', will output "x".

Then I change the '(default "x")' to '(default "y")' in foo.scm, and
re-run 'guile -L x.scm', it still output "x", I would expect it to
change to "y".

Only with '--fresh-auto-compile' or delete the cache of x.scm, I will
get the output "y".

Is this a bug?



reply via email to

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