bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: peval error


From: Ludovic Courtès
Subject: Re: peval error
Date: Fri, 16 Sep 2011 12:02:29 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Hi,

address@hidden (Ludovic Courtès) skribis:

> Apparently the problem stems from the fact that it uses the same gensyms
> in different places, which breaks the assumption behind
> ‘vars->bind-list’, as shown with this excerpt of partial evaluation of
> your expression:

Here’s a simpler test case:

  (define andy/tree-il/peval
    '(apply (toplevel fold)
            (lambda ()
              (lambda-case
               (((x2) #f #f #f () (#{x2 2899}#))
                (lexical x2 #{x2 2899}#))))
            (lambda ()
              (lambda-case
               (((x2) #f #f #f () (#{x2 2899}#))
                (lexical x2 #{x2 2899}#))))))

  (define andy/glil*
    (compile (parse-tree-il andy/tree-il/peval) #:from 'tree-il #:to 'glil
             #:opts '(#:partial-eval? #f)))

Compilation yields this error:

In current input:
   1392:2 15 (#<procedure 16223e0 at <current input>:1391:16 ()>)
In module/system/base/compile.scm:
    232:6 14 (compile #<tree-il (apply (toplevel fold) (lambda () (lambda-case 
(((x2) #f #f #f () (#{x2 2899}#)) (lexical x2 #{…> …)
   178:32 13 (lp (#<procedure compile-glil (x e opts)>) #<tree-il (apply 
(toplevel fold) (lambda () (lambda-case (((x2) #f #f #…> …)
In module/language/tree-il/compile-glil.scm:
    70:14 12 (compile-glil #<tree-il (apply (toplevel fold) (lambda () 
(lambda-case (((x2) #f #f #f () (#{x2 2899}#)) (lexical …> …)
    205:6 11 (flatten-lambda #<tree-il (lambda () (lambda-case ((() #f #f #f () 
()) (apply (toplevel fold) (lambda () (lambda-c…> …)
    197:4 10 (with-output-to-code #<procedure 1da0680 at 
module/language/tree-il/compile-glil.scm:206:7 (emit-code)>)
    782:9  9 (comp #<tree-il (lambda-case ((() #f #f #f () ()) (apply (toplevel 
fold) (lambda () (lambda-case (((x2) #f #f #f (…> …)
    508:9  8 (comp #<tree-il (apply (toplevel fold) (lambda () (lambda-case 
(((x2) #f #f #f () (#{x2 2899}#)) (lexical x2 #{x2 …> …)
In module/ice-9/boot-9.scm:
   611:17  7 (for-each #<procedure comp-push (tree)> (#<tree-il (lambda () 
(lambda-case (((x2) #f #f #f () (#{x2 2899}#)) (le…> …))
In module/language/tree-il/compile-glil.scm:
   681:26  6 (comp #<tree-il (lambda () (lambda-case (((x2) #f #f #f () (#{x2 
2899}#)) (lexical x2 #{x2 2899}#))))> push #f #f)
    205:6  5 (flatten-lambda #<tree-il (lambda () (lambda-case (((x2) #f #f #f 
() (#{x2 2899}#)) (lexical x2 #{x2 2899}#))))> #f #)
    197:4  4 (with-output-to-code #<procedure 1da0540 at 
module/language/tree-il/compile-glil.scm:206:7 (emit-code)>)
   747:13  3 (comp #<tree-il (lambda-case (((x2) #f #f #f () (#{x2 2899}#)) 
(lexical x2 #{x2 2899}#)))> tail #f #f)
   189:18  2 (emit-bindings #f (x2) (#{x2 2899}#) #<hash-table 7/31> #<tree-il 
(lambda () (lambda-case (((x2) #f #f #f () (#{x2…> …)
In module/ice-9/boot-9.scm:
   557:23  1 (map #<procedure 25f9120 at 
module/language/tree-il/compile-glil.scm:179:7 (id v)> (x2) (#{x2 2899}#))
In unknown file:
           0 (scm-error misc-error #f "~A ~S ~S ~S" ("bad var list element" x2 
#{x2 2899}# #f) #f)

Renaming one of the #{x2 2899}# fixes the problem.

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]