[plt-scheme] Redefining function from scheme/base

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Thu Jun 12 02:41:30 EDT 2008

Do you have to call your function 'real->decimal-string'? Will 
'my:real->decimal-string' work for you?

If your answer to the first question is yes, then the old trick is to 
make you own language (as a module) that exports your 
'real->decimal-string' and everything else from scheme. Then you can 
base you  other modules on your own language instead of scheme/base.


Mark Engelberg wrote:
> I'd like to redefine real->decimal-string in a module, and provide the
> redefinition to other modules, but I'm not sure how to do this.
> I'm using the module language, with #lang scheme at the top, and I get
> the "module: identifier is already imported in: real->decimal-string"
> error when I try to redefine.
> It looks liike real->decimal-string comes from the scheme/base module,
> but I'm not explicitly requiring it... it's just automatically
> included as part of the scheme language.  So how do I redefine this,
> and once I succeed at doing this, how do the consumer modules choose
> my redefinition over the base version?
> Thanks,
> Mark
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.