GNU bug report logs - #10337
cdr of `(cons #nil #nil)' is not nil

Previous Next

Package: guile;

Reported by: BT Templeton <bpt <at> hcoop.net>

Date: Wed, 21 Dec 2011 05:37:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: BT Templeton <bpt <at> hcoop.net>
To: 10337 <at> debbugs.gnu.org
Subject: bug#10337: cdr of `(cons #nil #nil)' is not nil
Date: Tue, 20 Dec 2011 22:49:58 -0500
I'm using Guile 2.0.3.87-b798 on x86_64-unknown-linux-gnu.

Guile's compiler fails to maintain the distinction between the nil
object and the empty list in some cases:

scheme@(guile-user)> (equal? (cons #t #nil) (cons #t '()))
$1 = #t
scheme@(guile-user)> (eq? (cdr (cons #t #nil)) (cdr (cons #t '())))
$2 = #t
scheme@(guile-user)> (compile '(cons #t #nil) #:from 'scheme #:to
  'tree-il)
$3 = #<tree-il (apply (toplevel cons) (const #t) (const #nil))>
scheme@(guile-user)> (compile '(cons #t #nil) #:from 'scheme #:to 'glil)
$4 = #<glil (program () (std-prelude 0 0 #f) (label :LCASE136) (const
  #t) (call list 1) (call return 1)>)

-- 
Inteligenta persono lernas la lingvon Esperanton rapide kaj facile.
Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla,
belsona, Esperanto estas la praktika solvo de la problemo de universala
interkompreno. Lernu la interlingvon Esperanton!




This bug report was last modified 13 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.