[Top][All Lists]

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

Unintentional conflict in define-immutable-type?

From: Rob Browning
Subject: Unintentional conflict in define-immutable-type?
Date: Wed, 18 Nov 2015 22:25:15 -0600
User-agent: Notmuch/0.20.1 ( Emacs/24.5.1 (x86_64-pc-linux-gnu)

This crashes in 2.0:

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

  (define-immutable-record-type foo
    (foo x)
    (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 and
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

reply via email to

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