From: Neil Jerram <neil@ossau.homelinux.net>
To: guile-user@gnu.org
Subject: Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(
Date: Thu, 31 Jul 2014 12:15:07 -0700 [thread overview]
Message-ID: <b0b0f57d21d376049ac18bc5a0c442c2@ossau.homelinux.net> (raw)
In-Reply-To: <87y4vaf3fr.fsf@drakenvlieg.flower>
On 2014-07-30 23:27, Jan Nieuwenhuizen wrote:
> Ludovic Courtès writes:
>
> Hi,
>
>> In this example, you want the reader extension to be available at
>> compile time, and not necessarily at run time. However, by writing
>> the
>> code as is, the reader extension is available only at run time, hence
>> the error.
>
> Alright, that makes sense when you think about it...
>
>> To require evaluation of the ‘define-reader-ctor’ form at compile
>> time,
>> change the code to (info "(guile) Eval When"):
>
> Wow, many thanks! This works for me; would it be nice to have some of
> this more explicitly in the srfi-10 manual?
This same problem just came up in another thread, too (look for
"ossaulib"). In that case the thing that needed to be enclosed in an
'eval-when' form was adding a directory to the load path.
I wonder about possibly having some magic that would automatically match
certain top-level forms and evaluate them at compile time. The case for
this for 'define-reader-ctor' feels quite strong. For the load path
case, it feels too hacky to try to recognize patterns like '(set!
%load-path (append %load-path ...))', but perhaps OK if we defined an
'add-to-load-path' procedure and applied the magic to that.
What do you think? Would that be too magical?
Regards,
Neil
next prev parent reply other threads:[~2014-07-31 19:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y4w9jog8.fsf@drakenvlieg.flower>
2014-07-05 13:40 ` cannot compile: srfi-10 define-reader-ctor 'hash '#,( Ludovic Courtès
2014-07-31 6:27 ` Jan Nieuwenhuizen
2014-07-31 19:15 ` Neil Jerram [this message]
2014-08-14 10:27 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 19:42 ` Neil Jerram
2014-08-14 19:54 ` Taylan Ulrich Bayirli/Kammer
2014-08-17 15:08 ` Ludovic Courtès
2014-08-11 15:48 ` Ludovic Courtès
2014-08-13 19:59 ` Jan Nieuwenhuizen
2014-08-13 20:43 ` Marko Rauhamaa
2014-08-13 21:00 ` Jan Nieuwenhuizen
2014-08-13 21:13 ` Ludovic Courtès
2014-08-13 21:33 ` Marko Rauhamaa
2014-08-14 4:03 ` Mark H Weaver
2014-08-13 21:06 ` Ludovic Courtès
2014-08-14 9:19 ` Panicz Maciej Godek
2014-08-14 9:53 ` Marko Rauhamaa
2014-08-14 10:30 ` Panicz Maciej Godek
2014-08-14 10:36 ` Marko Rauhamaa
2014-08-14 10:45 ` Panicz Maciej Godek
2014-08-14 12:59 ` Marko Rauhamaa
2014-08-14 13:58 ` Panicz Maciej Godek
2014-08-14 11:13 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 13:17 ` Marko Rauhamaa
2014-08-14 14:34 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 17:16 ` Marko Rauhamaa
2014-08-14 18:28 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 19:24 ` Marko Rauhamaa
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0b0f57d21d376049ac18bc5a0c442c2@ossau.homelinux.net \
--to=neil@ossau.homelinux.net \
--cc=guile-user@gnu.org \
/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).