From: Bela Pecsek
Subject: Need help with ACL4.3
Date: 
Message-ID: <33103822.4E4D3A5A@lighting.ge.com>
Dear CL users,

I'm using ACL4.3 on Linux and having some problems compiling a program
that was running on Clisp.

Here is a couple of ilustration code segments from the program:

;;;                       *Data structures*
;;;
;;;A PCVAR is a predicate-calculus variable, and is represented as a
;;;structure.
;;;                       *Reader syntax*
;;;
;;;?expression is read by the LISP reader as (make-pcvar :id expression)
;;;and printed as ?expression. That is when the LISP reader reads an
;;;atom starting with a question mark it automaticaly creates a variable
;;;and stores it in a structure represented by its :id.
;;;

(defstruct (pcvar (:print-function print-pcvar)) id)

(defun Print-Pcvar (var stream depth)
        (declare (ignore depth))
        (format stream "?~s" (pcvar-id var)))

(eval-when (compile load eval) ;; I tried it with and without eval-when
(set-macro-character #\?
        #'(lambda (stream char)
                (make-pcvar :id (read stream char))) t))

etc.

However, when I wana compile a file that includes the ? macro character
for example;
        .
        .
(defun Facts (&optional start end maximum)
  (let ((sorted-facts (sort (ps-fetch '?x) #'< :key #'wme-time-tag)))
       (cond ((not start)
        .

I get the following error massage:

;;; Writing fasl file kr-ps.fasl
Error: Object ?X cannot be written to a compiled file unless an
applicable
       method is defined on make-load-form.
  [condition type: PROGRAM-ERROR]

Restart actions (select using :continue):
 0: retry the compilation of kr-ps.lisp
 1: continue compiling kr-ps.lisp but generate no output file

[changing package from "COMMON-LISP-USER" to "KB"]
[1] KB(3):

I am not sure if it's because of the difference between cltl1 and cltl2.

If someone can help me and knows what's going on here, please send the
reply to ···········@lighting.ge.com cc-ed to ·····@elender.hu

Thanks in advance.

Yours,
Bela Pecsek
From: Steven M. Haflich
Subject: Re: Need help with ACL4.3
Date: 
Message-ID: <3314B414.56F1@franz.com>
Bela Pecsek wrote:

> (defun Facts (&optional start end maximum)
>   (let ((sorted-facts (sort (ps-fetch '?x) #'< :key #'wme-time-tag)))
>        (cond ((not start)

> ;;; Writing fasl file kr-ps.fasl
> Error: Object ?X cannot be written to a compiled file unless an
> applicable
>        method is defined on make-load-form.

Your compilation captures a pcvar object as a constant that must be
written to the compiled file.  See the discussion of MAKE-LOAD-FORM in
CLtL2 starting near the top of p.659.  See especially the sentence
starting on the last line of p.660.