﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1154	error using 'bindings' egg from an 'included' script	John Foerch	sjamaan	"The setup for this error is to have one script that includes another script, and the second script has (use bindings) and some use of the forms provided by the bindings egg.  For example:

######### test-case.scm

    (import chicken scheme)

    (use extras)

    (include ""script-that-uses-bindings.scm"")


######### script-that-uses-bindings.scm

    (use bindings)

    (pp (bind (a b c) (list 1 2 3) (list c b a)))


run with: csi -s test-case.scm

This resulted in the following error:

    Error: during expansion of (dbind21 ...) - unbound variable: macro-helpers#seq-destruc

        Call history:

        <syntax>          (##core#require-extension (bindings) #t)
        <syntax>          (##core#begin (##core#begin (##core#begin (##sys#require (quote bindings))) (import bindings)) (##co......
        <syntax>          (##core#begin (##core#begin (##sys#require (quote bindings))) (import bindings))
        <syntax>          (##core#begin (##sys#require (quote bindings)))
        <syntax>          (##sys#require (quote bindings))
        <syntax>          (quote bindings)
        <syntax>          (##core#quote bindings)
        <syntax>          (import bindings)
        <syntax>          (import scheme (only macro-helpers define-syntax-rule replace* seq-length seq-ref seq-tail bind-exce......
        <syntax>          (import scheme (only chicken receive case-lambda define-values let-values make-parameter error signa......
        <syntax>          (##core#undefined)
        <syntax>          (##core#undefined)
        <syntax>          (##core#undefined)
        <syntax>          (##core#undefined)
        <syntax>          (pp (bind (a b c) (list 1 2 3) (list c b a)))
        <syntax>          (bind (a b c) (list 1 2 3) (list c b a))      <--

If you use 'load' instead of 'include', there is no error.  Also if the first script (test-case.scm) does (use bindings) there is no error.

I tested this with Chicken 4.8.0.3 and bindings egg version 3.1.  Another person reported that they could reproduce the error with Chicken 4.9 as well.
"	defect	closed	major	someday	unknown	4.9.x	fixed		John Foerch	
