anchor.diff:  ;;
   
   (in-package :bert)
  +
  +
  +(defgeneric translate-complex-type (object)
  +  (:documentation "Translates tuples with the 'bert' tag to corresponding Lisp objects and vice versa."))
   
   
   (defclass bert-time ()
  
positive.code:      nil)))
  
  
  (defmethod encode (object)
    (cleric:encode object :version-tag t))
  
  (defmethod encode ((dict hash-table))
    (encode
     (tuple '|bert| '|dict|
  	  (loop
  	     for key being the hash-keys in dict using (hash-value value)
  	     collect (tuple key value)) )))
  
  
  (defun complex-type-p (bert-term)
    (when (and (typep bert-term 'tuple) (> 0 (arity bert-term)))
      (let ((first-element (aref (elements bert-term) 0)))
  
negative.code:     (encode (tuple '|bert| '|regex| (string-to-binary source) options))))
  
  
  (defmethod encode ((dict hash-table))
    (encode
     (tuple '|bert| '|dict|
  	  (loop
  	     for key being the hash-keys in dict using (hash-value value)
  	     collect (tuple key value)) )))
  
  
  (defmethod encode (object)
    (cleric:encode object :version-tag t))
  
  
  (deftype bert-translatable ()
    "A type that encompasses all types of Lisp objects that can be translated to BERT objects."
    '(satisfies bert-translatable-p))
  