[plt-scheme] Re: question about "module: initial import not well formed"

From: Rohan Drape (rohan.drape at gmail.com)
Date: Mon Mar 17 23:57:39 EDT 2008

 >  This is even emptier:
 >
 >   #lang scheme/base
 >   (provide #%require (rename-out [#%plain-module-begin #%module-begin]))

 yes, i had realized emptiness might be hard to pin down...

 i think by 'official' i meant rather an explanation in the manual
 of how to resolve name conflicts with the standard language
 modules.  since scheme/base defines a lot of names this is
 perhaps a common issue?

 (perhaps something along the lines of:
 http://haskell.org/onlinereport/modules.html#sect5.3.2)

 regards,
 rohan

 (also, one could hopefully write a lot of scheme without
 encountering  #%require #%app #%top #%datum and
 #%module-begin.)

 >
 >  which requires even more work to use -- you need to use the raw
 >  `#%require' to get started:
 >
 >   (module x2 "empty.ss"
 >     (#%require (only scheme/base require only-in))
 >
 >     (require (only-in scheme/base
 >                       #%app #%datum provide define lambda + printf))
 >
 >     (provide succ)
 >     (define succ (lambda (n) (+ n 1)))
 >     (printf ">>> ~s\n" (succ 7)))


Posted on the users mailing list.