Hi,

Noah Lavine <[email protected]> writes:

> Hi all,
>
> I looked at this. For the first error, I think the bug is in (language
> ecmascript compile-tree-il), where the file around line 369 says:
>
>       ((object . ,args)
>            (@impl new-object
>                   (map (lambda (x)
>                          (pmatch x
>                                  ((,prop ,val)
>                                   (-> (apply (-> (primitive 'cons))
>                                              (-> (const prop))
>                                              (comp val e))))
>                                  (else
>                                   (error "bad prop-val pair" x))))
>                        args)))

I don't know the guile internal (yet), but after looking around
(language tree-il) and (language ecmascript base) it seems `new-object'
want a list of pairs instead a list of lists.  I changed the above code
to

       `(apply ,(@implv new-object)
               ,@(map (lambda (x)
                        (pmatch x
                                ((,prop ,val)
                                 (-> (apply (-> (primitive 'cons))
                                            (-> (const prop))
                                            (comp val e))))
                                (else
                                 (error "bad prop-val pair" x))))
                      args)))

and it works.

Hope this helps you to diagnose the problem.

Cheers,
Kanru
-- 
A badly written book is only a blunder. A bad translation of a good
book is a crime.
                -- Gilbert Highet

Reply via email to