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

A stupid question



   From: leavens@bambam.cs.iastate.edu (Gary Leavens)
	   (defclass foo () ())
   but I get an error:
	   Error: The function DEFCLASS is undefined.
	   Error signalled by EVAL.
   However, (pcl:defclass foo () ()) works.  But does one always have to qualify
   such symbols?  To avoid this I tried executing
	   (use-package 'pcl)
   but I get the following: 
	   Error: Cannot use #<"PCL" package>
		  from #<"USER" package>,
		  because PCL:DEFCLASS and DEFCLASS will cause
		  a name conflict.
	   Error signalled by USE-PACKAGE.
   That seems odd, given the previous error....

The USE-PACKAGE error happens because you created the symbol
USER::DEFCLASS when you typed the first DEFCLASS form.  The subsequent
attempt to inherit PCL:DEFCLASS causes a name conflict.  This error
would not have happened if you hadn't already typed the first form.

CLtL1 (p.178 ff) requires this error to be continuable, but I don't
know if KCL supports this continuation.  Alternatively, you could have
removed the mistaken symbol from the USER package using UNINTERN.