[racket] Scribble and Contracts

From: Patrick King (slowthought at gmail.com)
Date: Sun Jul 31 19:36:49 EDT 2011

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110731/c7806e06/attachment.html>

Posted on the users mailing list.