how to do typedef's ?

Felix Klock felix_klock_ii@mac.com
Fri Dec 20 10:36:00 GMT 2002


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



More information about the Kawa mailing list