unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* export macro symbol with @ failed
@ 2011-06-13  3:54 nalaginrut
  2011-06-13 10:53 ` Ian Price
  2011-07-01 11:07 ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: nalaginrut @ 2011-06-13  3:54 UTC (permalink / raw)
  To: guile-devel

hi all, I got a problem with @.
It's OK when I export procedure with @:
==============
(define aaa (@ (rnrs) make-bytevector))
==============

but it'd failed if exported a macro.  
============================
scheme@(guile-user)> (define aaa (@ (rnrs) unless))
While compiling expression:
ERROR: Syntax error:
unknown location: source expression failed to match any pattern in form
unless
============================

is it a bug?

-- 
GNU Powered it
GPL Protected it
GOD Blessed it

HFG - NalaGinrut

--hacker key--
v4sw7CUSMhw6ln6pr8OSFck4ma9u8MLSOFw3WDXGm7g/l8Li6e7t4TNGSb8AGORTDLMen6g6RASZOGCHPa28s1MIr4p-x hackerkey.com
---end key---




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: export macro symbol with @ failed
  2011-06-13  3:54 export macro symbol with @ failed nalaginrut
@ 2011-06-13 10:53 ` Ian Price
  2011-06-13 11:25   ` nalaginrut
  2011-07-01 11:07 ` Andy Wingo
  1 sibling, 1 reply; 4+ messages in thread
From: Ian Price @ 2011-06-13 10:53 UTC (permalink / raw)
  To: NalaGinrut; +Cc: guile-devel

nalaginrut <nalaginrut@gmail.com> writes:

> hi all, I got a problem with @.
> It's OK when I export procedure with @:
> ==============
> (define aaa (@ (rnrs) make-bytevector))
> ==============
>
> but it'd failed if exported a macro.  
> ============================
> scheme@(guile-user)> (define aaa (@ (rnrs) unless))
> While compiling expression:
> ERROR: Syntax error:
> unknown location: source expression failed to match any pattern in form
> unless
> ============================
>
> is it a bug?

I don't think so. The second form would be equivalent to (define aaa
unless) if unless was imported by the module, and this is also an error
because unless is not an identifier syntax.

If I were you I'd (use-modules (rnrs control)) or (import (rnrs
control)) instead.

-- 
Ian Price

"There are only two hard problems in Computer Science: cache invalidation
and naming things." - Phil Karlton



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: export macro symbol with @ failed
  2011-06-13 10:53 ` Ian Price
@ 2011-06-13 11:25   ` nalaginrut
  0 siblings, 0 replies; 4+ messages in thread
From: nalaginrut @ 2011-06-13 11:25 UTC (permalink / raw)
  To: Ian Price; +Cc: guile-devel

> I don't think so. The second form would be equivalent to (define aaa
> unless) if unless was imported by the module, and this is also an error
> because unless is not an identifier syntax.
> 
> If I were you I'd (use-modules (rnrs control)) or (import (rnrs
> control)) instead.
> 

Well, thanks!
Finally I've wrote an unless macro for myself. But I'm happy to know the
reason why it failed. :)

-- 
GNU Powered it
GPL Protected it
GOD Blessed it

HFG - NalaGinrut

--hacker key--
v4sw7CUSMhw6ln6pr8OSFck4ma9u8MLSOFw3WDXGm7g/l8Li6e7t4TNGSb8AGORTDLMen6g6RASZOGCHPa28s1MIr4p-x hackerkey.com
---end key---




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: export macro symbol with @ failed
  2011-06-13  3:54 export macro symbol with @ failed nalaginrut
  2011-06-13 10:53 ` Ian Price
@ 2011-07-01 11:07 ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2011-07-01 11:07 UTC (permalink / raw)
  To: NalaGinrut; +Cc: guile-devel

Hi nalingarut,

On Mon 13 Jun 2011 05:54, nalaginrut <nalaginrut@gmail.com> writes:

> scheme@(guile-user)> (define aaa (@ (rnrs) unless))
> While compiling expression:
> ERROR: Syntax error:
> unknown location: source expression failed to match any pattern in form
> unless

As Ian said it's expected.  It would work like this:

  (define-syntax aaa (identifier-syntax (@ (rnrs) unless)))

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-01 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13  3:54 export macro symbol with @ failed nalaginrut
2011-06-13 10:53 ` Ian Price
2011-06-13 11:25   ` nalaginrut
2011-07-01 11:07 ` Andy Wingo

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).