marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

Cannot compile boolean=? with 3 or more arguments #97

Closed okuoku closed 7 years ago

okuoku commented 7 years ago

I am using Vicare Scheme https://github.com/marcomaggi/vicare/commit/b36131c72d39ebce2936d465bbcaaa9223359093 on a Ubutu16.04.2.

It seems Vicare cannot accept 3 or more arguments to boolean=? procedure. In R6RS it should take multiple object just as other procedures. http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_idx_598


Step to reproduce

  1. Create script file check.sps
  2. run with vicare check.sps
(import (rnrs))

(boolean=? #t #t #t)

Expected result

Acutual result

*** Vicare: unhandled exception:
 Condition components:
   1. &compile-time-arity-error
   2. &library: compiler
   3. &module: pass-introduce-unsafe-primrefs
   4. &who: %E-primref-call
   5. &message: "wrong number of arguments in core primitive application"
   6. &irritants: ((funcall (primref boolean=?)
   (known (constant #t)
     (T:true T:non-false T:boolean T:immediate T:object))
   (known (constant #t)
     (T:true T:non-false T:boolean T:immediate T:object))
   (known (constant #t)
     (T:true T:non-false T:boolean T:immediate T:object))))
marcomaggi commented 7 years ago

Acknowledged, I will look into it. Thanks for the report.

marcomaggi commented 7 years ago

Should be fixed in the head of the master branch. Can you confirm it?

okuoku commented 7 years ago

Confirmed the test passes on https://github.com/marcomaggi/vicare/commit/e732d0b5b6621ba6d95d5d07619372900e79eea7 Thanks!

Edit: ah, test in the original post also worked with the revision too.