unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guile-devel@gnu.org
Subject: Re: [PATCH] Transform R6RS SRFI module name on definition.
Date: Thu, 03 Dec 2015 10:05:09 +0100	[thread overview]
Message-ID: <877fkvaomy.fsf@T420.taylan> (raw)
In-Reply-To: <87vbapueqe.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Fri, 02 Oct 2015 23:45:13 +0200")

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> Currently our R6RS 'import' form automatically transforms an import like
> (srfi :n ...) to (srfi srfi-n ...).
>
> This works fine with the SRFIs that ship with Guile and any extra SRFI
> modules defined with the verbose name format (srfi srfi-n ...).
>
> However, when one really defines a library named (srfi :n ...), then
> 'import' fails to find this because it only looks for the verbose name.
>
> Here a transcript showcasing the issue:
>
> --- snip ---
> scheme@(guile-user)> (library (srfi :200) (export test) (import (rnrs base)) (define test 'test))
> scheme@(srfi :200)> ,m guile-user
> scheme@(guile-user)> (import (srfi :200))
> While compiling expression:
> ERROR: no code for module (srfi srfi-200)
> scheme@(guile-user)> ,use (srfi :200)
> scheme@(guile-user)> test
> $2 = test
> scheme@(guile-user)>
> --- snip ---
>
> (Use-modules actually finds it, as you see.)
>
> The attached patch makes our R6RS 'library' form automatically transform
> a library name like (srfi :n ...) to (srfi srfi-n ...).
>
> Will this leak out to the user in such a way that it breaks conformance
> or creates problems?  Is it bad that this time 'use-modules' won't be
> able to find (srfi :n ...)?  I don't think it is; users should just use
> (srfi :n ...) with 'import' and (srfi srfi-n ...) with 'use-modules'.
>
> Note that it's actually not 'import' itself that does the reverse
> transform but a deeper part of the system, and thus for instance the
> 'environment' form from (rnrs eval) also correctly resolves the module
> name (srfi :n ...) to (srfi srfi-n ...).  If there are any "holes" left
> where the transform doesn't happen, we should be able to plug those too.
>
> WDYT?

Ping.



  reply	other threads:[~2015-12-03  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 21:45 [PATCH] Transform R6RS SRFI module name on definition Taylan Ulrich Bayırlı/Kammer
2015-12-03  9:05 ` Taylan Ulrich Bayırlı/Kammer [this message]
2015-12-03  9:14   ` Taylan Ulrich Bayırlı/Kammer

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=877fkvaomy.fsf@T420.taylan \
    --to=taylanbayirli@gmail.com \
    --cc=guile-devel@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).