From: Debabrata Pani <debabrata.pani@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa@sourceware.org
Subject: Re: learning scheme with kawa
Date: Mon, 26 Oct 2015 03:43:00 -0000 [thread overview]
Message-ID: <CAKJw4fdP2g1bn3KxzcM=j2E1g7XggHsKb2rXqx+uad=8a=kM2w@mail.gmail.com> (raw)
In-Reply-To: <562D2117.4050405@bothner.com>
Thank you for the information, Per.
On changing the method name shorter? -> is_shorter? it works fine.
Of course your suggestion to modify the behavior makes sense as well.
Regards,
Debabrata Pani
On Mon, Oct 26, 2015 at 12:06 AM, Per Bothner <per@bothner.com> wrote:
>
>
> On 10/25/2015 10:59 AM, Debabrata Pani wrote:
>>
>> Is this a known discrepancy in the behavior of kawa?
>>
>> Are we violating any RNRS rule when we do this ?
>
>
> It's a Kawa feature that is misbehaving.
>
> As a work-around, try using require instead of load:
>
> (require “reciprocal.ss”)
>
> This causes the whole file to be processed as a unit,
> so the definition of shorter? is visible when compiling shorter.
>
> The gory details:
>
> The "feature" is that Kawa has special handling when it
> sees TYPE? . If there is no known definitions of TYPE?,
> but there is a known definition of TYPE then it will
> convert the TYPE? to '(lambda (obj) (instance? obj TYPE))'
>
> In this case, the Kawa compiler sees shorter?, there is (yet) no
> definition of shorter?, but there is one of shorter, so it
> does the above transformation.
>
> I think this is a Kawa bug. It should only convert TYPE?
> to (lambda (obj) (instance? obj TYPE)) when TYPE is actually
> bound to a class or a type. I'll have to think about the best
> way to do this.
> --
> --Per Bothner
> per@bothner.com http://per.bothner.com/
prev parent reply other threads:[~2015-10-26 3:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-25 17:59 Debabrata Pani
2015-10-25 18:36 ` Per Bothner
2015-10-26 3:43 ` Debabrata Pani [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKJw4fdP2g1bn3KxzcM=j2E1g7XggHsKb2rXqx+uad=8a=kM2w@mail.gmail.com' \
--to=debabrata.pani@gmail.com \
--cc=kawa@sourceware.org \
--cc=per@bothner.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).