probmods / webchurch

A Church to Javascript compiler (DEPRECATED)
Other
140 stars 15 forks source link

booleans in quote not transformed correctly #28

Closed ngoodman closed 11 years ago

ngoodman commented 11 years ago

(eq? (list true) '(true)) returns false, should be true.

this may be because the boolean inside the quote is turned into a string instead of a literal?

juliusc commented 11 years ago

Scheme has that eq? is a pointer comparison, while equal? is the recursive comparison, and right now we seem to have correct behavior for both.

http://groups.csail.mit.edu/mac/ftpdir/scheme-7.4/doc-html/scheme_4.html

ngoodman commented 11 years ago

I still think there's something fishy with booleans in quotes... This (apply not '(#f)) should return true, but it returns false.

longouyang commented 11 years ago

In the most recent version (b0d6be6035f2d54526e3aaa91e8a904b13a9d8d2), I get the same behavior for both

(apply not (list #f))

and

(apply not '(#f))

(namely, they both return true)

ngoodman commented 11 years ago

indeed.