[plt-scheme] polymorphism of primitive types
Yoav Goldberg wrote:
> When using module as modules, this can be easily done:
> (module my-prog1 mzscheme
> (require "my-seq.ss")
> ..)
> (module my-prog2 mzscheme
> (require "my-arith.ss")
> (require "my-seq.ss")
> ..)
>
> but when using modules as language, I would have to create a new language
> for every combination I want to use..
I suppose one could make a module "empty" that contains nothing
but #%module-begin and #%require. And also
mymzscheme.ss mzscheme without arithmetic and list operations
list.ss mzscheme list operations
arithmetic.ss mzscheme arithmetic
Then it would be no problem replacing
(module "empty.ss"
(require "mymzscheme.ss")
"arithmetic.ss"
"list.ss")
...)
with, say,
(module "empty.ss"
(require "mymzscheme.ss")
"myarithmetic.ss"
"list.ss")
...)
or
(module "empty.ss"
(require "mymzscheme.ss")
"arithmetic.ss"
"mylist.ss")
...)
--
Jens Axel Søgaard