This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
how to do typedef's ?
- From: Felix Klock <felix_klock_ii at mac dot com>
- To: kawa at sources dot redhat dot com
- Date: Wed, 2 Oct 2002 00:02:27 -0700
- Subject: how to do typedef's ?
Per (or anyone else)-
If I put the following code into a file named, "experiments.scm", and
compile, no problems.
(define <Procedure> <gnu.mapping.Procedure>)
(define-simple-class <LambdaPanel> (<javax.swing.JPanel>)
(proc <Procedure>)
((getClosure) :: <Procedure>
proc)
((setClosure (p :: <gnu.mapping.Procedure>)) :: <void>
(set! proc p)))
Example run:
% java kawa.repl -C ../experiments.scm
(compiling ../experiments.scm)
%
However, if I change the last occurrence of <gnu.mapping.Procedure>
type declaration to just <Procedure>, so that it matches the usage of
<Procedure> in getClosure, I get:
% java kawa.repl -C ../experiments.scm
(compiling ../experiments.scm)
../experiments.scm:6:22: unknown type name '<Procedure>'
%
So would this qualify as a bug? Or am I not generating type aliases in
a correct manner? I was using define's to do this type [ha ha] of
thing a year ago, but maybe things have changed since then...
-Felix