mdw-base.lisp: Make locative slots be read-only.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 21 Oct 2015 23:46:00 +0000 (00:46 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 22 Oct 2015 00:21:56 +0000 (01:21 +0100)
mdw-base.lisp

index b9e9257..6cdcccf 100644 (file)
 (export 'locp)
 (defstruct (loc (:predicate locp) (:constructor make-loc (reader writer)))
   "Locative data type.  See `locf' and `ref'."
-  (reader (slot-uninitialized) :type function)
-  (writer (slot-uninitialized) :type function))
+  (reader (slot-uninitialized) :type function :read-only t)
+  (writer (slot-uninitialized) :type function :read-only t))
 
 (export 'locf)
 (defmacro locf (place &environment env)