[Openmcl-devel] Is there a way to suppress this warning?

Ron Garret ron at flownet.com
Thu Apr 30 13:36:51 PDT 2015


Yes, but that’s not a good solution in my case.  The use case is that I want to write a macro called MOD-P that wraps a numerical calculation so that all of the computations in the lexical scope of the macro are performed modulo-P, in other words, the real expansion looks something like:

(flet ((+ (&rest args) (mod (apply ‘+ args) p))
       (- (&rest args) (mod (apply ‘- args) p))
       …

But I also want calculations that are NOT wrapped in the MOD-P macro to continue to work normally.

On Apr 30, 2015, at 12:36 PM, Karsten Poeck <karsten.poeck at gmail.com> wrote:

> On 30.04.15 20:08, Ron Garret wrote:
>> (flet ((+ () t)) t)
> Not sure whether you consider this a solution, but did you try shadowing +?
> 
> 
> ? (defpackage shadow-+  (:use :cl)(:shadow "+"))
> #<Package "SHADOW-+">
> ? (in-package :shadow-+)
> #<Package "SHADOW-+">
> ? (flet ((+ () t)) t)
> T
> ?
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list