GNU bug report logs - #18604
master srfi-26 cute compile error

Previous Next

Package: guile;

Reported by: Daniel Llorens <daniel.llorens <at> bluewin.ch>

Date: Thu, 2 Oct 2014 12:15:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18604 in the body.
You can then email your comments to 18604 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#18604; Package guile. (Thu, 02 Oct 2014 12:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Llorens <daniel.llorens <at> bluewin.ch>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 02 Oct 2014 12:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Llorens <daniel.llorens <at> bluewin.ch>
To: bug-guile <at> gnu.org
Subject: master srfi-26 cute compile error
Date: Thu, 2 Oct 2014 14:14:07 +0200
stable-2.0 with either cut or cute works. The compiler in master works for cut but not for cute.

scheme@(guile-user)> (import (srfi srfi-26))
scheme@(guile-user)> (cute < 1 <> 2)
While compiling expression:
ERROR: Wrong number of arguments to #<procedure 10b5a4380 at language/cps/types.scm:724:0 (in succ a b)>

Thanks,

	Daniel





Information forwarded to bug-guile <at> gnu.org:
bug#18604; Package guile. (Sun, 05 Oct 2014 17:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 18604 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Daniel Llorens <daniel.llorens <at> bluewin.ch>
Cc: wingo <at> pobox.com, 18604 <at> debbugs.gnu.org
Subject: Re: bug#18604: master srfi-26 cute compile error
Date: Sun, 05 Oct 2014 13:12:30 -0400
Daniel Llorens <daniel.llorens <at> bluewin.ch> writes:

> stable-2.0 with either cut or cute works. The compiler in master works for cut but not for cute.
>
> scheme@(guile-user)> (import (srfi srfi-26))
> scheme@(guile-user)> (cute < 1 <> 2)
> While compiling expression:
> ERROR: Wrong number of arguments to #<procedure 10b5a4380 at language/cps/types.scm:724:0 (in succ a b)>

The problem here is that the type analysis pass assumes that '<' takes
exactly two arguments.  In common cases, this works out okay because the
earlier 'expand-primitives' pass has rules that convert uses of '<' into
chains of binary '<' operations.  However, that only works when '<' is
in operator position at the time of the 'expand-primitives' pass.  In
the case of 'cute', this is not the case:

  scheme@(guile-user)> ,expand (cute < 1 <> 2)
  $1 = (let ((t-86 2) (t-85 1) (t-84 <))
    (lambda (t-96) (t-84 t-85 t-96 t-86)))

Then the partial evaluator does its thing:

  scheme@(guile-user)> ,optimize (cute < 1 <> 2)
  $2 = (lambda (t-113) (< 1 t-113 2))

and then the type analysis pass fails because its type-checkers and
type-inferrers for '<' (line 723 of language/cps/types.scm) assume that
it's a binary operation.

      Mark




Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Tue, 21 Jun 2016 21:22:02 GMT) Full text and rfc822 format available.

Notification sent to Daniel Llorens <daniel.llorens <at> bluewin.ch>:
bug acknowledged by developer. (Tue, 21 Jun 2016 21:22:02 GMT) Full text and rfc822 format available.

Message #13 received at 18604-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Daniel Llorens <daniel.llorens <at> bluewin.ch>
Cc: 18604-done <at> debbugs.gnu.org
Subject: Re: bug#18604: master srfi-26 cute compile error
Date: Tue, 21 Jun 2016 23:20:56 +0200
On Thu 02 Oct 2014 14:14, Daniel Llorens <daniel.llorens <at> bluewin.ch> writes:

> stable-2.0 with either cut or cute works. The compiler in master works for cut but not for cute.
>
> scheme@(guile-user)> (import (srfi srfi-26))
> scheme@(guile-user)> (cute < 1 <> 2)
> While compiling expression:
> ERROR: Wrong number of arguments to #<procedure 10b5a4380 at language/cps/types.scm:724:0 (in succ a b)>

Seems to be working in master.  Please file a new report if you find a
bug.  Cheers :)

Andy




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Jul 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.