Re: syntax-local-value patch for discussion

2012-01-26 Thread Stefan Israelsson Tampe
Remember it's not symbols but code objects that this refers to so I need to use the syntactic information and only augment the objects that can be joined and leave the other syntactic objects like symbols from another module and so on. I will try to leave the struct representation and use only lis

Re: syntax-local-value patch for discussion

2012-01-26 Thread Andy Wingo
Hi Stefan, On Mon 23 Jan 2012 17:06, Stefan Israelsson Tampe writes: > and when parse is ready to unpack S we could have > > S = #(syntax-object # wrap-part hygiene) > > Now I basically solve this problem by constructing Why do syntax->datum and datum->syntax not work for you to pack and unpac

Re: syntax-local-value patch for discussion

2012-01-23 Thread Stefan Israelsson Tampe
, Andy Wingo wrote: > Hi Stefan, > > On Thu 19 Jan 2012 10:50, Stefan Israelsson Tampe > writes: > > > Working on porting syntax-parse is a learning experience and I know > > understand how it uses syntax-local-value as a way to lookup a syntax > > object by join

Re: syntax-local-value patch for discussion

2012-01-23 Thread Andy Wingo
Hi Stefan, On Thu 19 Jan 2012 10:50, Stefan Israelsson Tampe writes: > Working on porting syntax-parse is a learning experience and I know > understand how it uses syntax-local-value as a way to lookup a syntax > object by joining the wraps together with the total wrap at the mac

Re: syntax-local-value patch for discussion

2012-01-19 Thread Stefan Israelsson Tampe
Hi, Working on porting syntax-parse is a learning experience and I know understand how it uses syntax-local-value as a way to lookup a syntax object by joining the wraps together with the total wrap at the macro call. The question is if this really are the total wrap e.g. contains the history of

Re: syntax-local-value patch for discussion

2012-01-14 Thread Stefan Israelsson Tampe
Ok, I have tried follow your suggestion, here is what I could make, (with-fluids ((*macro-lookup* (lambda (e) (cond ((number? e) (pk w)) ((symbol? e)

Re: syntax-local-value patch for discussion

2012-01-08 Thread Stefan Israelsson Tampe
Thanks for taking time to help with this! On Sun, Jan 8, 2012 at 8:15 PM, Mark H Weaver wrote: > Hi Stefan, > > Stefan Israelsson Tampe writes: > > diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm > > index e522f54..70463a5 100644 > > --- a/module/ice-9/psyntax.scm > > +++ b/mod

Re: syntax-local-value patch for discussion

2012-01-08 Thread Mark H Weaver
Hi Stefan, Stefan Israelsson Tampe writes: > diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm > index e522f54..70463a5 100644 > --- a/module/ice-9/psyntax.scm > +++ b/module/ice-9/psyntax.scm > @@ -155,6 +155,10 @@ > (eval-when (compile) >(set-current-module (resolve-module '

Re: syntax-local-value patch for discussion

2012-01-08 Thread Stefan Israelsson Tampe
information used at a lookup in psyntax for an identifier but it would be better if it returns a lookup procedure that applied to a syntax object gives the lookuped information assuming that psyntax is not mutating. using this primitive we can design a syntax-local-value according to racket e.

News>> gmane.lisp.guile.devel: Re: syntax-local-value [racket]

2012-01-06 Thread Eli Barzilay
6 hours ago, Andy Wingo wrote: > > > syntax-local-value > > > > e.g. > > http://docs.racket-lang.org/reference/stxtrans.html#%28def._%28%28quote._~23~25kernel%29._syntax-local-value%29%29 > > We don't have this. It wouldn't be too hard to implement th

Re: syntax-local-value patch for discussion

2012-01-06 Thread Andy Wingo
On Mon 05 Dec 2011 19:12, Stefan Israelsson Tampe writes: > (define-syntax info >   (lambda (x) >     (syntax-case x () >   ((_ x) >     (pk (syntax-binding-info (syntax->datum #'x))) >     #'#f I agree with Ian that we should be operating on syntax objects here, not on datums.

Re: syntax-local-value

2012-01-06 Thread Andy Wingo
On Sun 04 Dec 2011 20:22, Stefan Israelsson Tampe writes: > In looking at racket syntax-parse there seems to be some advanced macrology > that is not included in guile. Indeed :) > syntax-local-value > > e.g. > http://docs.racket-lang.org/reference/stxtrans.html#%28def

Re: syntax-local-value patch for discussion

2011-12-09 Thread Stefan Israelsson Tampe
Hi, On Thu, Dec 8, 2011 at 10:58 PM, Ian Price wrote: > Stefan Israelsson Tampe writes: > > > So I tried to get hold of the macro binding. So with the following patch > wich should be enogh > > for me to make progress porting rackets syntax parse to guile. > > > > Would be very glad if we could

Re: syntax-local-value patch for discussion

2011-12-08 Thread Ian Price
Stefan Israelsson Tampe writes: > So I tried to get hold of the macro binding. So with the following patch wich > should be enogh > for me to make progress porting rackets syntax parse to guile. > > Would be very glad if we could find a interface to expose this information > that is sane > and

syntax-local-value patch for discussion

2011-12-05 Thread Stefan Israelsson Tampe
h meta information to macros local or not by using a weak hash. Anyway a hack but it shows what is needed. Happy Hacking :-) -- Forwarded message -- From: Stefan Israelsson Tampe Date: Sun, Dec 4, 2011 at 8:22 PM Subject: syntax-local-value To: guile-devel In looking at racket

syntax-local-value

2011-12-04 Thread Stefan Israelsson Tampe
In looking at racket syntax-parse there seems to be some advanced macrology that is not included in guile. The light now is on the possibility to attach data to macros. I figure that I could reproduce this by using a weak hash-table but miss the functionality of syntax-local-value e.g. http