This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]