(index ("describe" 0) ("describe-object" 417) ("describe-sequence-limit" 1673) ("set-describer!" 1673) ("dump" 1673) ("hexdump" 1673))
(def (sig (procedure "(describe obj #!optional out)" (id describe))) (p "Prints a textual description of " (tt "OBJ") " to output port " (tt "OUT") ", which defaults to " (tt "(current-output-port)") ".  For coops objects, this dispatches to " (tt "describe-object") "; otherwise it calls " (tt "describe") " from the " (int-link "/egg/describe" "describe egg") ".") (p "Note that this is not a generic procedure."))
(def (sig (procedure "(describe-object obj out)" (id describe-object))) (p "Generic procedure specialized on " (tt "OBJ") ", responsible for printing the textual description of " (tt "OBJ") ".  " (tt "describe") " calls this under the hood.") (pre "#;> (define-class <point> () (x y z))") (pre "#;> (describe <point>)\ncoops standard-class <point>\n  class precedence list: (<standard-object>)\n  slots: (x y z)") (pre "#;> (describe (make <point> 'x 1 'y 2 'z 3))\ncoops instance of class <point>:\n  x : 1\n  y : 2\n  z : 3") (pre "#;> (define-method (describe-object (obj <point>) out)\n      (fprintf out \"<point> object with coordinates (~A, ~A, ~A)~%\"\n       (slot-value obj 'x) (slot-value obj 'y) (slot-value obj 'z)))") (pre "#;> (describe (make <point> 'x 1 'y 2 'z 3))\n<point> object with coordinates (1, 2, 3)") (p "If " (tt "coops-primitive-objects") " is loaded, you can specialize on primitive objects such as fixnums; the default implementation prints both the object's class and the " (i "describe") " egg's description. For example:") (pre "#;> (describe 3)\nexact integer 3 (#x3 #o3 #b11 #\\x3)\n#;> (use coops-primitive-objects)\n#;> (describe 3)\ncoops instance of primitive class <fixnum>\nexact integer 3 (#x3 #o3 #b11 #\\x3)"))
(def (sig (parameter "(describe-sequence-limit n)" (id describe-sequence-limit)) (procedure "(set-describer! tag proc)" (id set-describer!)) (procedure "(dump obj #!optional offset length out)" (id dump)) (procedure "(hexdump bv start end ref out)" (id hexdump))) (p "Same as their " (int-link "/egg/describe" "describe egg") " equivalents. They are exported for convenience, so " (tt "(use describe)") " is not required when using this egg.") (p "It's not currently possible to dump a coops object."))
