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]

define-alias not being exported


I want to create a type synonym in one module:
  (module-name 'M1)
  (module-static #t)

  (define-alias <newtype> <object>)

and use it in another:
  (module-name 'M2)
  (module-static #t)

  (require <kb7.mm3.general.M1>)

  (define (use-type (newtype <newtype>)) <void>
    (+ 1 2)
  )

  (define (use-type-2 (something-else <int>)
                      (newtype <newtype>)) <void>
    (+ 1 2)
  )

but the compiler doesn't recognise the alias in M2:
  [d:\kb7\mm3\general]java kawa.repl -d \. -P kb7.mm3.general. -C M2.scm
  (compiling M2.scm)
  M2.scm:6:28: unknown type name '<newtype>'
  M2.scm:11:30: unknown type name '<newtype>'

Per, in http://sources.redhat.com/ml/kawa/2001/msg00015.html , which is
your 27 Jan 2001 reply to my question about "Simplifying type names", you
tell me that define-alias (which I then didn't know of) can be used to
alias type names, and that JEmacs does so. So I hope the error isn't being
caused by my using it for something it's not intended for. But is there
any way, other than manually copying the alias into the importing module,
that I can make this work across modules? It's one more thing I need to
solve before a Kawa demo next week.

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




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