Hello, Manuel,
I am porting SRFI-42 (Eager Comprehensions) to Bigloo. In doing this, I ran 
into a couple of problems. The first was that the default implementation 
assumes that identifiers can start with colons (:) and this is not true for 
Bigloo; keywords start or end with a colon. I was able to address this in the 
manner Alex Shinn did in his gauche implementation of SRFI-42 by renaming. The 
next problem I ran into was a syntax-rules expansion problem. Due to the 
continuation passing style of the macros being used, symbols were being 
multiply prepended with the hygiene-mark (|hygiene.r5rs.mark|) but the current 
definition of hygiene-value only strips off a single instance of the 
hygiene-mark. I was able to work around this by changing the definition of 
hygiene-value to strip all occurrences of hygiene-mark not just the first. See 
below. However, I am not sure that this is correct from a hygiene perspective 
or not. Does this definition of hygiene-value call problems.


(define (hygiene-value x)
   (if (not (symbol? x))
       x
       (let ((s (symbol->string x)))
      (let loop ((s s))
             (if (substring-at? s hygiene-prefix 0)
                 (loop (substring s hygiene-prefix-len (string-length s)))
                 (string->symbol s))))))
Thank You,Joseph Donaldson
 

Reply via email to