[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

package problems

    Date: Mon, 17 Aug 1992 18:12 EDT
    From: Robin Kladke 977-9760 <robin@orion.den.mmc.com> (303)

    I am using an XL400 under Genera 8.0.
    I am having a bunch of trouble getting packages defined correctly in a system I
    have put together.  A few files in the system require CLOS.  Those files call
    out ALP-CLOS in the top line.  The package ALP-CLOS is defined as below:

    (defpackage alp-clos
      (:use "common-lisp")
      (:use "clos")
      (:shadowing-import documentation setf))

    I wanted to define the package with the following CL code, by the Symbolics 
    doesn't support it:

    (defpackage alp-clos
      (:use "common-lisp")
      (:shadowing-import-from "clos" documentation)
      (:shadowing-import-from "clos" setf)
      (:use "clos"))

    The system uses common lisp user as the default package; alp-clos is called out
    as needed in particular files.

    I first time i load the system, I get package problems; e.g.,

    Trap: The function CLASS-PROTOTYPE is undefined

    even though the defpackage code defined above has been loaded.

    If I quit at this point and reload the system, I get:

    Error: Making package ALP-CLOS use package CLOS causes name conflicts:

    When I choose the option:

    <RESUME> Prefer the symbols from CLOS, un-interning or shadowing competitors.

    everything loads and runs fine from then on.

    How do I avoid this error loop?  Is my defpackage wrong?  Am I loading things in
    the wrong order?  I am quite perplexed.  Any suggestions would be appreciated.

    --Robin Rouch Kladke
    Martin Marietta
    Denver, CO

Try using the FUTURE-COMMON-LISP version of DEFPACKAGE.  This will
default to using FUTURE-COMMON-LISP instead of COMMON-LISP.
FUTURE-COMMON-LISP already contains CLOS.

;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: FCL-USER; Base: 10 -*-

(defpackage ALP-CLOS

(defpackage ALP-CLOS
  (:use "common-lisp")
  (:shadowing-import-from "clos" documentation)
  (:shadowing-import-from "clos" setf)
  (:use "clos"))

Craig Lanning <CLanning@trc.scra.org>
Grumman Data Systems
North Charleston, SC