[racket] require error

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Oct 18 10:41:10 EDT 2011

This sounds like a bug in #lang eopl (at least in the error message
reporting), but this program is still not enough to actually reproduce
the problem. For me, for example, this works fine:

#lang eopl
(require racket/base)
(require racket/list)

So it isn't just having two requires.

Robby

On Tue, Oct 18, 2011 at 9:37 AM, Marco Morazan <morazanm at gmail.com> wrote:
> I see where there are some problems.
>
> First, I see they are attempting to mutate variables defined in a
> required module. This, I believe, can be fixed by exporting mutating
> functions from the required module.
>
> Second, they want to have multiple require statements like:
>
> #lang eopl
> (require racket/base)
> (require "green.rkt")
>
> <code>
>
> The above produces the following error:
>
>  #%module-begin: bad syntax in: (#%module-begin (#%require
> racket/base) (#%require "green.rkt") ...
>
> Commenting out the first require statement causes an expected error on
> a function in racket/base:
>
>  expand: unbound identifier in module in: build-vector
>
> Is this enough context to point me in the right direction?
>
>
>
> On Tue, Oct 18, 2011 at 9:23 AM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> I think we'll probably need some more context to say what is going on.
>> Can you post a complete program that has that symptom?
>>
>> Robby
>>
>> On Tue, Oct 18, 2011 at 8:16 AM, Marco Morazan <morazanm at gmail.com> wrote:
>>> I'm at a loss with this error. Can anyone provide some insight?
>>>
>>> So, I have the following (in a file named green.rkt):
>>> (module green ...
>>>  (provide expr)
>>>  (provide program)
>>>  ...
>>>  ;(provide num-functs)
>>>
>>>  <a bunch of definitions including definitions for expr, program,
>>> num-functs, and everything in the ...>  )
>>>
>>> In a different file I have:
>>>
>>> (require "green.rkt")
>>>
>>> If as above, I comment out (provide num-functs) I get the following error:
>>>
>>>     expand: unbound identifier in module in: num-functs
>>>
>>> This makes sense since I have not provided num-functs.
>>>
>>> If I uncomment it I get the following error:
>>>
>>>  #%module-begin: bad syntax in: (#%module-begin (#%require
>>> scheme/base) (#%require "green.rkt") (define-syntaxes (prog)
>>> (let-values (((cert) (#%app syntax-local-certifier (quote #t)))) ....
>>>
>>> There is no problem reported with any other of my provide statements
>>> which resolved all other of my errors of type 1 above (i.e., expand).
>>>
>>> Any suggestions?
>>>
>>>
>>> --
>>>
>>> Cheers,
>>>
>>> Marco
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://lists.racket-lang.org/listinfo/users
>>>
>>
>
>
>
> --
>
> Cheers,
>
> Marco
>



Posted on the users mailing list.