[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #841: tuples and skiplists: Many warnings (probab
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #841: tuples and skiplists: Many warnings (probably due to the contracts egg) (was: tuples: Many warnings (probably due to the contracts egg)) |
Date: |
Sun, 13 May 2012 15:57:36 -0000 |
#841: tuples and skiplists: 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
Resolution: | Keywords:
-------------------------+--------------------------------------------------
Description changed by sjamaan:
Old description:
> 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.
New description:
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
The skiplists egg has the same problem: http://parenteses.org/mario/misc
/specialize-report/install/skiplists.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#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.