
(/VERSIONCHECK 2) 

(PUT '|ICARD;<;2$B;1| '|SPADreplace|
     '(XLAM (|x| |y|) (CGREATERP |y| |x|))) 

(DEFUN |ICARD;<;2$B;1| (|x| |y| $) (CGREATERP |y| |x|)) 

(PUT '|ICARD;=;2$B;2| '|SPADreplace| 'EQUAL) 

(DEFUN |ICARD;=;2$B;2| (|x| |y| $) (EQUAL |x| |y|)) 

(DEFUN |ICARD;display;$V;3| (|x| $)
  (PROG (|name| |type|)
    (RETURN
      (SEQ (LETT |name| (|dbName| |x|) . #0=(|ICARD;display;$V;3|))
           (LETT |type| (|dbPart| |x| 4 1) . #0#)
           (EXIT (SPADCALL
                     (SPADCALL |name|
                         (SPADCALL " : " |type| (QREFELT $ 10))
                         (QREFELT $ 10))
                     (QREFELT $ 13))))))) 

(DEFUN |ICARD;fullDisplay;$V;4| (|x| $)
  (PROG (|name| |type| |origin| |fromPart| |condition| |ifPart|
                |exposed?| |exposedPart| |firstPart| |secondPart|)
    (RETURN
      (SEQ (LETT |name| (|dbName| |x|) . #0=(|ICARD;fullDisplay;$V;4|))
           (LETT |type| (|dbPart| |x| 4 1) . #0#)
           (LETT |origin|
                 (SPADCALL (|alqlGetOrigin| |x|) (|alqlGetParams| |x|)
                     (QREFELT $ 10)) . #0#)
           (LETT |fromPart|
                 (SPADCALL " from " |origin| (QREFELT $ 10)) . #0#)
           (LETT |condition| (|dbPart| |x| 6 1) . #0#)
           (LETT |ifPart|
                 (COND
                   ((EQUAL |condition| "") (SPADCALL (QREFELT $ 15)))
                   (#1='T
                    (SPADCALL " if "
                        (SPADCALL |condition| (QREFELT $ 17))
                        (QREFELT $ 10)))) . #0#)
           (LETT |exposed?| (SUBSTRING (|dbPart| |x| 3 1) 0 1) . #0#)
           (LETT |exposedPart|
                 (COND
                   ((EQUAL |exposed?| "n") " (unexposed)")
                   (#1# (SPADCALL (QREFELT $ 15)))) . #0#)
           (LETT |firstPart|
                 (SPADCALL |name|
                     (SPADCALL " : " |type| (QREFELT $ 10))
                     (QREFELT $ 10)) . #0#)
           (LETT |secondPart|
                 (SPADCALL |fromPart|
                     (SPADCALL |ifPart| |exposedPart| (QREFELT $ 10))
                     (QREFELT $ 10)) . #0#)
           (EXIT (SPADCALL
                     (SPADCALL |firstPart| |secondPart| (QREFELT $ 10))
                     (QREFELT $ 13))))))) 

(PUT '|ICARD;coerce;S$;5| '|SPADreplace| '(XLAM (|s|) |s|)) 

(DEFUN |ICARD;coerce;S$;5| (|s| $) |s|) 

(DEFUN |ICARD;coerce;$Of;6| (|x| $) (SPADCALL |x| (QREFELT $ 17))) 

(DEFUN |ICARD;elt;$SS;7| (|x| |sel| $)
  (PROG (|s|)
    (RETURN
      (SEQ (LETT |s| (PNAME |sel|) |ICARD;elt;$SS;7|)
           (EXIT (COND
                   ((EQUAL |s| "name") (|dbName| |x|))
                   ((EQUAL |s| "nargs") (|dbPart| |x| 2 1))
                   ((EQUAL |s| "exposed")
                    (SUBSTRING (|dbPart| |x| 3 1) 0 1))
                   ((EQUAL |s| "type") (|dbPart| |x| 4 1))
                   ((EQUAL |s| "abbreviation") (|dbPart| |x| 5 1))
                   ((EQUAL |s| "kind") (|alqlGetKindString| |x|))
                   ((EQUAL |s| "origin") (|alqlGetOrigin| |x|))
                   ((EQUAL |s| "params") (|alqlGetParams| |x|))
                   ((EQUAL |s| "condition") (|dbPart| |x| 6 1))
                   ((EQUAL |s| "doc") (|dbComments| |x|))
                   ('T (|error| "unknown selector")))))))) 

(DEFUN |IndexCard| ()
  (PROG ()
    (RETURN
      (PROG (#0=#:G1827)
        (RETURN
          (COND
            ((LETT #0# (HGET |$ConstructorCache| '|IndexCard|)
                   . #1=(|IndexCard|))
             (|CDRwithIncrement| (CDAR #0#)))
            ('T
             (UNWIND-PROTECT
               (PROG1 (CDDAR (HPUT |$ConstructorCache| '|IndexCard|
                                   (LIST
                                    (CONS NIL (CONS 1 (|IndexCard;|))))))
                 (LETT #0# T . #1#))
               (COND
                 ((NOT #0#) (HREM |$ConstructorCache| '|IndexCard|))))))))))) 

(DEFUN |IndexCard;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|IndexCard|) . #0=(|IndexCard|))
        (LETT $ (GETREFV 24) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|IndexCard| NIL (CONS 1 $))
        (|stuffDomainSlots| $)
        $)))) 

(MAKEPROP '|IndexCard| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|Boolean|) |ICARD;<;2$B;1|
             |ICARD;=;2$B;2| (|OutputForm|) (0 . |hconcat|) (|Void|)
             (|OutputPackage|) (6 . |output|) |ICARD;display;$V;3|
             (11 . |empty|) (|String|) (15 . |coerce|)
             |ICARD;fullDisplay;$V;4| |ICARD;coerce;S$;5|
             |ICARD;coerce;$Of;6| (|Symbol|) |ICARD;elt;$SS;7|
             (|SingleInteger|))
          '#(~= 20 |min| 26 |max| 32 |latex| 38 |hash| 43 |fullDisplay|
             48 |elt| 53 |display| 59 |coerce| 64 >= 74 > 80 = 86 <= 92
             < 98)
          'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0 0))
                (CONS '#(|OrderedSet&| |SetCategory&| |BasicType&| NIL)
                      (CONS '#((|OrderedSet|) (|SetCategory|)
                               (|BasicType|) (|CoercibleTo| 9))
                            (|makeByteWordVec2| 23
                                '(2 9 0 0 0 10 1 12 11 9 13 0 9 0 15 1
                                  16 9 0 17 2 0 6 0 0 1 2 0 0 0 0 1 2 0
                                  0 0 0 1 1 0 16 0 1 1 0 23 0 1 1 0 11
                                  0 18 2 0 16 0 21 22 1 0 11 0 14 1 0 0
                                  16 19 1 0 9 0 20 2 0 6 0 0 1 2 0 6 0
                                  0 1 2 0 6 0 0 8 2 0 6 0 0 1 2 0 6 0 0
                                  7)))))
          '|lookupComplete|)) 

(MAKEPROP '|IndexCard| 'NILADIC T) 
