[racket] Scribble and Contracts
On Aug 1, 2011 6:15 AM, "Matthew Flatt" <mflatt at cs.utah.edu> wrote:
>
> Thanks for the report! I've pushed a repair to the Racket git repo.
Thanks for the repair!
>
> The problem was a mismatch between `make-base-eval' and
> `make-base-eval-factory'. If you use `make-base-eval-factory' within
> DrRacket (or some other context where `racket/gui/base' is loaded),
> then the factory couldn't attach modules from an internal namespace to
> the new evaluators that it creates.
>
> At Sun, 31 Jul 2011 18:36:49 -0500, Patrick King wrote:
> > While trying to scribble some documentation, I came across what seems to
be
> > a bug involving contracts and scribble's interaction form.
> >
> > my-module.scrbl:
> >
> > #lang scribble/manual
> > @(require scribble/eval)
> >
> > When I introduce contracts into "my-module.rkt", the following lines...
> >
> > @(define my-eval (make-eval-factory (list "my-module.rkt")))
> >
> > @(interaction #:eval (my-eval)
> > (my-thunk))
> >
> > ... produces the error message:
> >
> > namespace-attach-module: a different module with the same name is
already in
> > the destination namespace, for name: "C:\Program
> > Files\Racket\collects\racket\contract.rkt"
> >
> > my-module.rkt:
> >
> > #lang racket/base
> > (require racket/contract)
> > (provide/contract [my-thunk (-> void?)])
> > (define (my-thunk) (display (format "Hi there, Racket fans!~n")))
> >
> > If I do not use contracts in my-module.rkt, then the scribbling works
fine.
> > If I do, then evaluating (my-eval) generates the error.
> >
> > What up?
> > _________________________________________________
> > For list-related administrative tasks:
> > http://lists.racket-lang.org/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110801/56a1f6df/attachment.html>