[plt-scheme] an r6rs library compatible repl?
On Mar 19, Rohan Drape wrote:
>
> thanks, i have managed to learn why
>
> (module x (only-in scheme/base) ...)
>
> is not much use, all of the semi-opaque #% infrastructure
> disappears. and of course i recognize plt modules are obviously
> more flexible than haskell etc. but hadn't realized some of the
> implications, it does seem to make avoiding simple name collisions
> with scheme/base rather tricky?
(That part should be easier now, with Matthew's change)
> (i mentioned the haskell example because the prelude is also
> slightly anti-symetrical to ordinary module use since it is
> implicit, and you need to add a line to make it go away. also, i
> was hoping for an 'only-in' solution instead of an 'all-except'
> solution because i already had an 'only-in' list of all the required
> names from the r6rs variants import list).
The standard way to solve this (which you were not doing, and running
to these problems as a result) is to define your own language module
(module foo scheme/base
(provide (except-out (all-from-out scheme/base) foo bar ...)
(rename-out [my-foo foo] [my-bar bar] ...))
(define my-foo ...)
(define my-bar ...)
...)
This way you get all the usual stuff that is implicit.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!