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

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Mar 17 23:12:48 EDT 2008

On Mar 18, Rohan Drape wrote:
> thanks, the below seems to work.  perhaps an official empty module
> would be useful (short as it is, it's not entirely obvious).
> 
> empty.ss:
> (module empty scheme/base
>   (provide #%app #%top #%datum #%module-begin require only-in provide))

This is even emptier:

  #lang scheme/base
  (provide #%require (rename-out [#%plain-module-begin #%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)))

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.