Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.duke.edu!convex!cs.utexas.edu!math.ohio-state.edu!jussieu.fr!univ-lille1.fr!zaphod.crihan.fr!warwick!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: LISP packages and their manipulation
Message-ID: <Cwwouu.IMF@cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: bute.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <369bvg$l12@galaxy.ucr.edu>
Date: Thu, 29 Sep 1994 19:30:29 GMT
Lines: 40

In article <369bvg$l12@galaxy.ucr.edu> tbassam@ucrengr.ucr.edu (bassam tabbara) writes:
>This is a follow-up to the vague question I posted earlier.
>
>In detail, here's what I am trying to do. I have a Common Lisp package
>(a program that does some case-based reasoning) and my objective is to
>translate that code into C/C++ for easier portability. I am using another
>package called CLiCC to do the translation. My problem is that I cannot
>"input" the Lisp code into the CLiCC package (I am running a CLOS compiler as
>the environment where all this is happening) since CLiCC is being loaded into
>the USER package. The other software (the one I am trying to translate) is
>declared as a separate package called "protos".
>
>My problem is that I do not know how to have CLiCC "work on"(i.e. translate)
>the protos software. I do not know what the proper procedure to follow is.

Why is this a problem?  For instance, in an ordinary Common Lisp,
this works just fine:

  (in-package "GLOOP")
  (defun compile-that-file (f)
    (compile-file f))

[So compile-that-file is in the GLOOP package]

  (compile-that-file "some-file.lsp")

[where some-file says (in-package "SOME-OTHER-PACKAGE").

So both compile-file (in the COMMON-LISP package) and
compile-that-file (in the GLOOP package) can translate 
(compile) software that's in various other packages.

If CLiCC translates CL to C, it too should be able to do
this in a similarly straightforward way.

(CLiCC will have to handle package-related forms in the file
it's translating, but if it's a translator for CL then it
should alreay be doing it.)

-- jeff
