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 stefan.ita...@gmail.com writes: and when parse is ready to unpack S we could have S = #(syntax-object #struct-s wrap-part hygiene) Now I basically solve this problem by constructing Why do syntax-datum and datum-syntax not work

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

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 stefan.ita...@gmail.com 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

Re: syntax-local-value patch for discussion

2012-01-23 Thread Stefan Israelsson Tampe
Ok, here is a discussoin using code in syntax-parse. Let's start with the defintion of a syntax-class, str in the macro package syntax-parse: (define-syntax-class str #:attributes () #:opaque #:commit #:description string (pattern (~and x (~fail #:unless (string? (syntax-e #'x)) So the

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-08 Thread Mark H Weaver
Hi Stefan, Stefan Israelsson Tampe stefan.ita...@gmail.com 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

Re: syntax-local-value patch for discussion

2012-01-06 Thread Andy Wingo
On Mon 05 Dec 2011 19:12, Stefan Israelsson Tampe stefan.ita...@gmail.com 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

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 ianpric...@googlemail.comwrote: Stefan Israelsson Tampe stefan.ita...@gmail.com 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

Re: syntax-local-value patch for discussion

2011-12-08 Thread Ian Price
Stefan Israelsson Tampe stefan.ita...@gmail.com 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