chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #841: tuples: Many warnings (probably due to the cont


From: Chicken Trac
Subject: [Chicken-janitors] #841: tuples: Many warnings (probably due to the contracts egg)
Date: Sun, 13 May 2012 15:52:30 -0000

#841: tuples: Many warnings (probably due to the contracts egg)
------------------------+---------------------------------------------------
 Reporter:  sjamaan     |       Owner:  juergen
     Type:  defect      |      Status:  new    
 Priority:  minor       |   Milestone:         
Component:  extensions  |     Version:  4.7.x  
 Keywords:              |  
------------------------+---------------------------------------------------
 We recently ran salmonella with the {{{-specialize}}} option (which
 implies the {{{-scrutinize}}} option), and it turns out that the tuples
 egg raises quite a few warnings when it's being compiled:
 http://parenteses.org/mario/misc/specialize-report/install/tuples.html

 I attempted to track down the cause, but proved to be extremely difficult.
 It looks like it's not tuples itself that's in the wrong, but its use of
 the contracts egg is causing the trouble.  When I compile the test suite
 of contracts with {{{-specialize}}} I also see a few warnings.

 In the end I was able to reduce it to this program that fails:

 {{{
 (use contracts)

 (define-with-contract (single xpr)
   (range (even? result))
   (lambda (sel) (print xpr)))
 }}}

 This is the warning I see:

 {{{
 $ csc -specialize contracts-test.scm
 Warning: at toplevel:
   (contracts-test.scm:4) in procedure call to `g108109', expected 1
 argument, but was given 0 arguments
 }}}

 When running with {{{-debug 2}}}, I see that single is a procedure which
 receives one "{{{proc}}}" argument, but it is called with zero arguments.
 Oddly enough, the code doesn't fail immediately. I really don't understand
 where it's going wrong, but the macros that apply here are quite complex!
 They're probably generating some dead code that is wrong even though it
 never gets called, and that's why the compiler still flags it.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/841>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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