public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* redefine a variable in a kawa module
@ 2023-10-22 20:54 Damien Mattei
  2023-10-23 11:11 ` Damien Mattei
  0 siblings, 1 reply; 2+ messages in thread
From: Damien Mattei @ 2023-10-22 20:54 UTC (permalink / raw)
  To: kawa mailing list

i suppose Kawa, as Racket don not allow redefinitions in a module:

/Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/kawa/matrix.scm:37:29:
duplicate declaration of '*'
/Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/kawa/matrix.scm:35:29:
(this is the previous declaration of '*')

the source code was:
(overload-existing-operator * multiply-matrix-matrix (matrix? matrix?))

(overload-existing-operator * multiply-matrix-vector (matrix? vector?))

redefinition is mandatory with overloading, Guile allow it,
in racket i can use:

(require (rename-in racket/base (proc
                               orig-proc)))

does Kawa have a mechanism to do that?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: redefine a variable in a kawa module
  2023-10-22 20:54 redefine a variable in a kawa module Damien Mattei
@ 2023-10-23 11:11 ` Damien Mattei
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Mattei @ 2023-10-23 11:11 UTC (permalink / raw)
  To: kawa mailing list

finally not a problem of redefinition.... investigating my code....

On Sun, Oct 22, 2023 at 10:54 PM Damien Mattei <damien.mattei@gmail.com> wrote:
>
> i suppose Kawa, as Racket don not allow redefinitions in a module:
>
> /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/kawa/matrix.scm:37:29:
> duplicate declaration of '*'
> /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/kawa/matrix.scm:35:29:
> (this is the previous declaration of '*')
>
> the source code was:
> (overload-existing-operator * multiply-matrix-matrix (matrix? matrix?))
>
> (overload-existing-operator * multiply-matrix-vector (matrix? vector?))
>
> redefinition is mandatory with overloading, Guile allow it,
> in racket i can use:
>
> (require (rename-in racket/base (proc
>                                orig-proc)))
>
> does Kawa have a mechanism to do that?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-23 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-22 20:54 redefine a variable in a kawa module Damien Mattei
2023-10-23 11:11 ` Damien Mattei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).