boot8.lisp 1.25 KB
Newer Older
emarsden's avatar
 
emarsden committed
1 2 3 4 5 6 7
;;;
;;; Bootfile for adding package locks.
;;; Use this file as bootstrap.lisp using Pierre Mai's build scripts,
;;;

(in-package :lisp)

pmai's avatar
pmai committed
8 9 10 11
;; Ensure all packages have been set up, since package definition is broken
;; once this file has been loaded:
(load "target:code/exports")

emarsden's avatar
 
emarsden committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
(defvar *enable-package-locked-errors* nil)

;;;
;;; Like DEFSTRUCT, but silently clobber old definitions.
;;;
(defmacro defstruct! (name &rest stuff)
  `(handler-bind ((error (lambda (c)
			   (declare (ignore c))
			   (invoke-restart 'kernel::clobber-it))))
     (defstruct ,name ,@stuff)))


(defstruct! (package
	    (:constructor internal-make-package)
	    (:predicate packagep)
	    (:print-function %print-package)
	    (:make-load-form-fun
	     (lambda (package)
	       (values `(package-or-lose ',(package-name package))
		       nil))))
  (tables (list nil))
  (%name nil :type (or simple-string null))
  (%nicknames () :type list)
  (%use-list () :type list)
  (%used-by-list () :type list)
  (internal-symbols (required-argument) :type package-hashtable)
  (external-symbols (required-argument) :type package-hashtable)
  (%shadowing-symbols () :type list)
  (lock nil :type boolean)
  (definition-lock nil :type boolean)
  (doc-string nil :type (or simple-string null)))


;;; end of file