unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Unintentional conflict in define-immutable-type?
@ 2015-11-19  4:25 Rob Browning
  2015-11-19 20:32 ` Mark H Weaver
  2015-11-19 20:40 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Rob Browning @ 2015-11-19  4:25 UTC (permalink / raw)
  To: guile-devel


This crashes in 2.0:

  (use-modules (srfi srfi-9 gnu))

  (define-immutable-record-type foo
    (foo x)
    foo?
    (x x))

  (foo 1)

like this:

  foo.scm:10:9: In procedure #<procedure 131fd00 ()>:
  foo.scm:10:9: In procedure make-struct: Wrong type argument in position 1: #<procedure %foo-procedure (x)>

Changing the type name to <foo> (or even xfoo) fixes the conflict, even
though "define-immutable-type foo" actually creates a binding for <foo>,
not foo.

I thought there was a chance this might be unintentional.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



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

end of thread, other threads:[~2015-11-27 21:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19  4:25 Unintentional conflict in define-immutable-type? Rob Browning
2015-11-19 20:32 ` Mark H Weaver
2015-11-22  2:12   ` Rob Browning
2015-11-27 21:21     ` Mark H Weaver
2015-11-27 21:33       ` Rob Browning
2015-11-19 20:40 ` Ludovic Courtès
2015-11-27 18:34   ` Rob Browning
2015-11-27 20:37     ` Ludovic Courtès
2015-11-27 21:24   ` Rob Browning

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).