namin / staged-miniKanren

staged relational interpreters: running with holes, faster
124 stars 16 forks source link

Bug with lifting of staged code #15

Open michaelballantyne opened 8 months ago

michaelballantyne commented 8 months ago

This following works fine:

(let ([y 0])
  (run 1 (x)
    (== x y)))

But this gives an error:

(let ([y 0])
  (run 1 (x)
    (staged
      (== x y))))

The error it gives is:

variable y_10 is not bound
Context (plain):
 ~/Code/staged-miniKanren/private/faster-minikanren/mk.scm:354:7 
~Code/staged-miniKanren/private/faster-minikanren/mk.scm:317:9 
 ~/Code/staged-miniKanren/private/faster-minikanren/mk.scm:322:0 take

(Likely related to our use of syntax-local-lift-expression)