chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] csc -profile has problems


From: Peter Bex
Subject: Re: [Chicken-hackers] csc -profile has problems
Date: Sat, 5 Mar 2016 17:20:42 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Mar 01, 2016 at 12:11:16PM +0100, Jörg F. Wittenberger wrote:
> Hi,
> 
> csc -profile bails out on some code it otherwise compiles.
> 
> So far the smallest example I have is the reference implementation of
> srfi-35.  It complains that really-make-condition-type is called with
> the wrong number of arguments right here:
> 
> Another example is in the comparators egg:
> 
> (define (binary<? comparator a b)
>   ((comparator-ordering-predicate comparator) a b))
> 
> (define (binary>? comparator a b)
>   (binary<? comparator b a))
> 
> Here it claims binary<? being called with the wrong number of arguments.

I have whittled it down to a minimal test case:

(module comparators (in-order? swapped?)
  (import chicken scheme)
  (: comparator-says-yes? (* * * --> boolean))
  (define (comparator-says-yes? comparator a b) (comparator a b))
  (define (swapped? comparator a b) (comparator-says-yes? comparator b a))
  (define (in-order? comparator a b) (comparator-says-yes? comparator a b)))

Interestingly, if you remove the definition of swapped? or in-order?, it
works.  And if you remove the type declaration, it also works.  Likely
it's an interaction between the optimizer and the scrutinizer.

I'll continue investigating

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

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