[<<][staapl][>>][..]
Mon Apr 28 14:08:47 EDT 2008

next try

let's make a simpler example first: 2 level nesting of scat->2stack
and 2stack->scat.

works just fine..

(define-ns (macro) test-b
  (lambda (s)
    (printf "test-b ~a\n" s)
    s))

(define-ns (macro) test-a
  (2stack->scat
   (match-lambda
    ((struct 2stack (asm ctrl))

     (printf "test-a ~a\n" asm)
     (let ((out
            ((scat->2stack macro/test-b)
             (make-2stack asm ctrl))))
       out)))))

box> ,scat (require "macro.ss") (macro:: 1 test-b 2 test-a 3)
toplevel in /home/tom/scat/
with-breakpoints:init #<continuation-prompt-tag:2stack> #<stack> #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
test-b #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
test-a ((qw 2) (qw 1))
with-breakpoints:init #<continuation-prompt-tag:2stack> #<stack> #<stack>
test-b #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
with-breakpoints:next #<continuation-prompt-tag:2stack> #<stack> #<stack>
(qw 1)
(qw 2)
(qw 3)
box>


so it's somewhere else..
EDIT: i ran into a segfault somewhere..
EDIT: that bug is fixed, maybe try to see if this code now works?
EDIT: ok.. my bug is still there, i'm going to let it go.


[Reply][About]
[<<][staapl][>>][..]