CrossClj

1.10.0-alpha4 docs

SourceDocs



RECENT
    VARS
    *code-table*
    *current-length*
    *current-level*
    *default-page-width*
    *format-str*
    *print-base*
    *print-circle*
    *print-lines*
    *print-miser-width*
    *print-pprint-dispatch*
    *print-pretty*
    *print-radix*
    *print-right-margin*
    *print-shared*
    *print-suppress-namespaces*
    *symbol-map*
    abort?
    absolute-reposition
    absolute-tabulation
    add-core-ns
    add-english-scales
    add-to-buffer
    ancestor?
    arg-navigator
    base-str
    binding-map
    boolean-conditional
    brackets
    buffer-blob
    buffer-blob?
    buffer-length
    c-write-char
    cached-compile
    capitalize-string
    capitalize-word-writer
    check-arg-conditional
    check-enumerated-arg
    check-flags
    choice-conditional
    cl-format
    code-dispatch
    collect-clauses
    column-writer
    compile-directive
    compile-format
    compile-raw-string
    compiled-directive
    conditional-newline
    consume
    consume-while
    convert-ratio
    defdirectives
    deftype
    directive-table
    dollar-float
    downcase-writer
    else-separator?
    emit-nl
    emit-nl?
    end-block
    end-block-t
    end-block-t?
    english-cardinal-tens
    english-cardinal-units
    english-ordinal-tens
    english-ordinal-units
    english-scale-numbers
    execute-format
    execute-sub-format
    expand-fixed
    exponential-float
    extract-flags
    extract-param
    extract-params
    fixed-float
    flag-defs
    float-parts
    float-parts-base
    format-ascii
    format-cardinal-english
    format-error
    format-integer
    format-logical-block
    format-new-roman
    format-old-roman
    format-ordinal-english
    format-roman
    format-simple-cardinal
    format-simple-number
    format-simple-ordinal
    formatter
    formatter-out
    fresh-line
    general-float
    get-column
    get-field
    get-fixed
    get-format-arg
    get-line
    get-max-column
    get-miser-width
    get-pretty-writer
    get-section
    get-sub-section
    get-writer
    getf
    group-by*
    inc-s
    indent
    indent-t
    indent-t?
    init-cap-writer
    init-navigator
    insert-decimal
    insert-scaled-decimal
    integral?
    iterate-list-of-sublists
    iterate-main-list
    iterate-main-sublists
    iterate-sublist
    java-base-formats
    justify-clauses
    level-exceeded
    linear-nl?
    logical-block
    logical-block-or-justify
    ltrim
    make-buffer-blob
    make-end-block-t
    make-indent-t
    make-nl-t
    make-pretty-writer
    make-start-block-t
    map-params
    map-passing-context
    map-ref-type
    miser-nl?
    modify-case
    multi-defn
    needs-pretty
    new-roman-table
    next-arg
    next-arg-or-nil
    nl
    nl-t
    nl-t?
    old-roman-table
    opt-base-str
    orig-pr
    p-write-char
    param-pattern
    parse-lb-options
    plain-character
    pll-mod-body
    pp
    pp-newline
    pprint
    pprint-anon-func
    pprint-array
    pprint-binding-form
    pprint-code-list
    pprint-code-symbol
    pprint-cond
    pprint-condp
    pprint-defn
    pprint-hold-first
    pprint-ideref
    pprint-if
    pprint-indent
    pprint-let
    pprint-list
    pprint-logical-block
    pprint-map
    pprint-newline
    pprint-ns
    pprint-ns-reference
    pprint-pqueue
    pprint-reader-macro
    pprint-set
    pprint-simple-code-list
    pprint-simple-default
    pprint-simple-list
    pprint-tab
    pprint-vector
    pr-with-base
    prefix-count
    prerr
    pretty-character
    pretty-writer
    pretty-writer?
    print-length-loop
    print-table
    prlabel
    process-bracket
    process-clause
    process-directive-table-element
    process-nesting
    readable-character
    reader-macros
    realize-parameter
    realize-parameter-list
    relative-reposition
    relative-tabulation
    remainders
    render-clauses
    right-bracket
    round-str
    rtrim
    section
    separator?
    set-field
    set-indent
    set-logical-block-callback
    set-max-column
    set-miser-width
    set-pprint-dispatch
    setf
    simple-dispatch
    single-defn
    special-chars
    special-params
    special-radix-markers
    split-at-newline
    start-block
    start-block-t
    start-block-t?
    table-ize
    tok
    tokens-fit?
    toks
    translate-param
    tuple-map
    two-forms
    type-map
    unzip-map
    upcase-writer
    update-nl-state
    use-method
    with-pprint-dispatch
    with-pretty-writer
    write
    write-buffered-output
    write-initial-lines
    write-line
    write-option-table
    write-out
    write-to-base
    write-token
    write-token-string
    write-tokens
    write-white-space

    « Index of all namespaces of this project

    A Pretty Printer for Clojure
    
    clojure.pprint implements a flexible system for printing structured data
    in a pleasing, easy-to-understand format. Basic use of the pretty printer is 
    simple, just call pprint instead of println. More advanced users can use 
    the building blocks provided to create custom output formats. 
    
    Out of the box, pprint supports a simple structured format for basic data 
    and a specialized format for Clojure source code. More advanced formats, 
    including formats that don't look like Clojure data at all like XML and 
    JSON, can be rendered by creating custom dispatch functions. 
    
    In addition to the pprint function, this module contains cl-format, a text 
    formatting function which is fully compatible with the format function in 
    Common Lisp. Because pretty printing directives are directly integrated with
    cl-format, it supports very concise custom dispatch. It also provides
    a more powerful alternative to Clojure's standard format function.
    
    See documentation for pprint and cl-format for more information or 
    complete documentation on the Clojure web site on GitHub.

    — Tom Faulhaber

    Dynamic
    The base to use for printing integers and rationals.
    
    PrivateDynamic
    Mark circular structures (N.B. This is not yet used)
    
    PrivateDynamic
    Maximum number of lines to print in a pretty print instance (N.B. This is not yet used)
    
    Dynamic
    The column at which to enter miser style. Depending on the dispatch table, 
    miser style add newlines in more places to try to keep lines short allowing for further 
    levels of nesting.
    multimethodDynamic
    The pretty print dispatch function. Use with-pprint-dispatch or set-pprint-dispatch
    to modify.
    Dynamic
    Bind to true if you want write to use pretty printing
    
    Dynamic
    Print a radix specifier in front of integers and rationals. If *print-base* is 2, 8, 
    or 16, then the radix specifier used is #b, #o, or #x, respectively. Otherwise the 
    radix specifier is in the form #XXr where XX is the decimal value of *print-base* 
    Dynamic
    Pretty printing will try to avoid anything going beyond this column.
    Set it to nil to have pprint let the line be arbitrarily long. This will ignore all 
    non-mandatory newlines.
    PrivateDynamic
    Mark repeated structures rather than repeat them (N.B. This is not yet used)
    
    Dynamic
    Don't print namespaces with symbols. This is particularly useful when 
    pretty printing the results of macro expansions
    Private
    (abort? context)
    Private
    (absolute-reposition navigator position)
    Private
    (absolute-tabulation params navigator offsets)
    Private
    (add-core-ns amap)
    Private
    (add-english-scales parts offset)
    Take a sequence of parts, add scale numbers (e.g., million) and combine into a string
    offset is a factor of 10^3 to multiply by
    Private
    (add-to-buffer this token)
    Private
    (ancestor? parent child)
    Private
    (base-str base val)
    Return val as a string in the given base
    
    macroPrivate
    (binding-map amap & body)
    Private
    (boolean-conditional params arg-navigator offsets)
    Private
    (brackets form)
    Figure out which kind of brackets to use
    
    Private
    (buffer-blob? x__9503__auto__)
    Private
    (buffer-length l)
    Private
    (c-write-char this c)
    Private
    (capitalize-string s first?)
    Capitalizes the words in a string. If first? is false, don't capitalize the 
    first character of the string even if it's a letter.
    Private
    (capitalize-word-writer writer)
    Returns a proxy that wraps writer, capitalizing all words
    
    Private
    (check-arg-conditional params arg-navigator offsets)
    Private
    (check-enumerated-arg arg choices)
    Private
    (check-flags def flags)
    Private
    (choice-conditional params arg-navigator offsets)
    (cl-format writer format-in & args)
    An implementation of a Common Lisp compatible format function. cl-format formats its
    arguments to an output stream or string based on the format control string given. It 
    supports sophisticated formatting of structured data.
    
    Writer is an instance of java.io.Writer, true to output to *out* or nil to output 
    to a string, format-in is the format control string and the remaining arguments 
    are the data to be formatted.
    
    The format control string is a string to be output with embedded 'format directives' 
    describing how to format the various arguments passed in.
    
    If writer is nil, cl-format returns the formatted result string. Otherwise, cl-format 
    returns nil.
    
    For example:
     (let [results [46 38 22]]
            (cl-format true "There ~[are~;is~:;are~]~:* ~d result~:p: ~{~d~^, ~}~%" 
                       (count results) results))
    
    Prints to *out*:
     There are 3 results: 46, 38, 22
    
    Detailed documentation on format control strings is available in the "Common Lisp the 
    Language, 2nd edition", Chapter 22 (available online at:
    http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node200.html#SECTION002633000000000000000) 
    and in the Common Lisp HyperSpec at 
    http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm
    multimethod
    (code-dispatch object)
    The pretty print dispatch function for pretty printing Clojure code.
    
    Private
    (collect-clauses bracket-info offset remainder)
    Private
    (column-writer writer)(column-writer writer max-columns)
    Private
    (compile-directive s offset)
    Private
    (compile-format format-str)
    Compiles format-str into a compiled format which can be used as an argument
    to cl-format just like a plain format string. Use this function for improved 
    performance when you're using the same format string repeatedly
    Private
    (compile-raw-string s offset)
    Private
    (conditional-newline params navigator offsets)
    Private
    (consume func initial-context)
    Private
    (consume-while func initial-context)
    Private
    (convert-ratio x)
    macroPrivate
    (defdirectives & directives)
    macroPrivate
    (deftype type-name & fields)
    Private
    (dollar-float params navigator offsets)
    Private
    (downcase-writer writer)
    Returns a proxy that wraps writer, converting all characters to lower case
    
    Private
    (else-separator? this)
    Private
    (emit-nl this nl)
    multimethodPrivate
    Private
    (end-block this)
    Private
    (end-block-t? x__9503__auto__)
    Private
    (execute-format stream format args)(execute-format format args)
    Executes the format with the arguments.
    
    Private
    (execute-sub-format format args base-args)
    Private
    (expand-fixed m e d)
    Private
    (exponential-float params navigator offsets)
    Private
    (extract-flags s offset)
    Private
    (extract-param [s offset saw-comma])
    Private
    (extract-params s offset)
    Private
    (fixed-float params navigator offsets)
    Private
    (float-parts f)
    Take care of leading and trailing zeros in decomposed floats
    
    Private
    (float-parts-base f)
    Produce string parts for the mantissa (normalized 1-9) and exponent
    
    Private
    (format-ascii print-func params arg-navigator offsets)
    Private
    (format-cardinal-english params navigator offsets)
    Private
    (format-error message offset)
    Private
    (format-integer base params arg-navigator offsets)
    Private
    (format-logical-block params navigator offsets)
    Private
    (format-new-roman params navigator offsets)
    Private
    (format-old-roman params navigator offsets)
    Private
    (format-ordinal-english params navigator offsets)
    Private
    (format-roman table params navigator offsets)
    Format a roman numeral using the specified look-up table
    
    Private
    (format-simple-cardinal num)
    Convert a number less than 1000 to a cardinal english string
    
    Private
    (format-simple-number n)
    Private
    (format-simple-ordinal num)
    Convert a number less than 1000 to a ordinal english string
    Note this should only be used for the last one in the sequence
    macro
    (formatter format-in)
    Makes a function which can directly run format-in. The function is
    fn [stream & args] ... and returns nil unless the stream is nil (meaning 
    output to a string) in which case it returns the resulting string.
    
    format-in can be either a control string or a previously compiled format.
    macro
    (formatter-out format-in)
    Makes a function which can directly run format-in. The function is
    fn [& args] ... and returns nil. This version of the formatter macro is
    designed to be used with *out* set to an appropriate Writer. In particular,
    this is meant to be used as part of a pretty printer dispatch method.
    
    format-in can be either a control string or a previously compiled format.
    (fresh-line)
    Make a newline if *out* is not already at the beginning of the line. If *out* is
    not a pretty writer (which keeps track of columns), this function always outputs a newline.
    Private
    (general-float params navigator offsets)
    Private
    (get-column this)
    Private
    (get-field this sym)
    Private
    (get-fixed m e d)
    Private
    (get-format-arg navigator)
    Private
    (get-line this)
    Private
    (get-max-column this)
    Private
    (get-miser-width this)
    (get-pretty-writer writer)
    Returns the java.io.Writer passed in wrapped in a pretty writer proxy, unless it's 
    already a pretty writer. Generally, it is unnecessary to call this function, since pprint,
    write, and cl-format all call it if they need to. However if you want the state to be 
    preserved across calls, you will want to wrap them with this. 
    
    For example, when you want to generate column-aware output with multiple calls to cl-format, 
    do it like in this example:
    
        (defn print-table [aseq column-width]
          (binding [*out* (get-pretty-writer *out*)]
            (doseq [row aseq]
              (doseq [col row]
                (cl-format true "~4D~7,vT" col column-width))
              (prn))))
    
    Now when you run:
    
        user> (print-table (map #(vector % (* % %) (* % % %)) (range 1 11)) 8)
    
    It prints a table of squares and cubes for the numbers from 1 to 10:
    
           1      1       1    
           2      4       8    
           3      9      27    
           4     16      64    
           5     25     125    
           6     36     216    
           7     49     343    
           8     64     512    
           9     81     729    
          10    100    1000
    Private
    (get-section buffer)
    Private
    (get-sub-section buffer)
    Private
    (get-writer this)
    macroPrivate
    (getf sym)
    Get the value of the field named by the argument (which should be a keyword).
    
    Private
    (group-by* unit lis)
    Private
    (inc-s s)
    Assumption: The input string consists of one or more decimal digits,
    and no other characters.  Return a string containing one or more
    decimal digits containing a decimal number one larger than the input
    string.  The output string will always be the same length as the input
    string, or one character longer.
    Private
    (indent this relative-to offset)
    Private
    (indent-t? x__9503__auto__)
    Private
    (init-cap-writer writer)
    Returns a proxy that wraps writer, capitalizing the first word
    
    Private
    (init-navigator s)
    Create a new arg-navigator from the sequence with the position set to 0
    
    Private
    (insert-decimal m e)
    Insert the decimal point at the right spot in the number to match an exponent
    
    Private
    (insert-scaled-decimal m k)
    Insert the decimal point at the right spot in the number to match an exponent
    
    Private
    (integral? x)
    returns true if a number is actually an integer (that is, has no fractional part)
    
    Private
    (iterate-list-of-sublists params navigator offsets)
    Private
    (iterate-main-list params navigator offsets)
    Private
    (iterate-main-sublists params navigator offsets)
    Private
    (iterate-sublist params navigator offsets)
    Private
    (justify-clauses params navigator offsets)
    Private
    (level-exceeded)
    Private
    (linear-nl? this lb section)
    Private
    (logical-block-or-justify params navigator offsets)
    Private
    (ltrim s c)
    Trim all instances of c from the beginning of sequence s
    
    Private
    (make-buffer-blob & vals__9502__auto__)
    Private
    (make-end-block-t & vals__9502__auto__)
    Private
    (make-indent-t & vals__9502__auto__)
    Private
    (make-nl-t & vals__9502__auto__)
    Private
    (make-pretty-writer base-writer right-margin miser-width)
    Wrap base-writer in a PrettyWriter with the specified right-margin and miser-width
    
    Private
    (make-start-block-t & vals__9502__auto__)
    Private
    (map-params def params flags offset)
    Takes a directive definition and the list of actual parameters and
    a map of flags and returns a map of the parameters and flags with defaults
    filled in. We check to make sure that there are the right types and number
    of parameters as well.
    Private
    (map-passing-context func initial-context lis)
    Private
    (map-ref-type name)
    Map ugly type names to something simpler
    
    Private
    (miser-nl? this lb section)
    Private
    (modify-case make-writer params navigator offsets)
    Private
    (multi-defn alis has-doc-str?)
    Private
    (needs-pretty format)
    determine whether a given compiled format has any directives that depend on the
    column number or pretty printing
    Private
    (next-arg navigator)
    Private
    (next-arg-or-nil navigator)
    Private
    (nl this type)
    Private
    (nl-t? x__9503__auto__)
    Private
    (opt-base-str base val)
    Return val as a string in the given base, using clojure.core/format if supported
    for improved performance
    Private
    (p-write-char this c)
    Private
    (parse-lb-options opts body)
    Private
    (plain-character params navigator offsets)
    Private
    (pll-mod-body var-sym body)
    macro
    (pp)
    A convenience macro that pretty prints the last thing output. This is
    exactly equivalent to (pprint *1).
    (pprint object)(pprint object writer)
    Pretty print object to the optional output writer. If the writer is not provided, 
    print the object to the currently bound value of *out*.
    Private
    (pprint-anon-func alis)
    Private
    (pprint-binding-form binding-vec)
    Private
    (pprint-code-list alis)
    Private
    (pprint-code-symbol sym)
    Private
    (pprint-cond alis)
    Private
    (pprint-condp alis)
    Private
    (pprint-defn alis)
    Private
    (pprint-ideref o)
    (pprint-indent relative-to n)
    Create an indent at this point in the pretty printing stream. This defines how 
    following lines are indented. relative-to can be either :block or :current depending 
    whether the indent should be computed relative to the start of the logical block or
    the current column position. n is an offset. 
    
    This function is intended for use when writing custom dispatch functions.
    
    Output is sent to *out* which must be a pretty printing writer.
    Private
    (pprint-let alis)
    Private
    (pprint-list alis)
    macro
    (pprint-logical-block options* body)
    Execute the body as a pretty printing logical block with output to *out* which 
    must be a pretty printing writer. When used from pprint or cl-format, this can be 
    assumed. 
    
    This function is intended for use when writing custom dispatch functions.
    
    Before the body, the caller can optionally specify options: :prefix, :per-line-prefix, 
    and :suffix.
    Private
    (pprint-map amap)
    (pprint-newline kind)
    Print a conditional newline to a pretty printing stream. kind specifies if the 
    newline is :linear, :miser, :fill, or :mandatory. 
    
    This function is intended for use when writing custom dispatch functions.
    
    Output is sent to *out* which must be a pretty printing writer.
    Private
    (pprint-ns alis)
    The pretty print dispatch chunk for the ns macro
    
    Private
    (pprint-ns-reference reference)
    Pretty print a single reference (import, use, etc.) from a namespace decl
    
    Private
    (pprint-reader-macro alis)
    Private
    (pprint-simple-code-list alis)
    Private
    (pprint-simple-default obj)
    Private
    (pprint-simple-list alis)
    (pprint-tab kind colnum colinc)
    Tab at this point in the pretty printing stream. kind specifies whether the tab
    is :line, :section, :line-relative, or :section-relative. 
    
    Colnum and colinc specify the target column and the increment to move the target
    forward if the output is already past the original target.
    
    This function is intended for use when writing custom dispatch functions.
    
    Output is sent to *out* which must be a pretty printing writer.
    
    THIS FUNCTION IS NOT YET IMPLEMENTED.
    Private
    (pprint-vector avec)
    Private
    (pr-with-base x)
    Private
    (prefix-count aseq val)
    Return the number of times that val occurs at the start of sequence aseq,
    if val is a seq itself, count the number of times any element of val
    occurs at the beginning of aseq
    Private
    (prerr & args)
    Println to *err*
    
    Private
    (pretty-character params navigator offsets)
    Private
    (pretty-writer writer max-columns miser-width)
    Private
    (pretty-writer? x)
    Return true iff x is a PrettyWriter
    
    macro
    (print-length-loop bindings & body)
    A version of loop that iterates at most *print-length* times. This is designed 
    for use in pretty-printer dispatch functions.
    (print-table ks rows)(print-table rows)
    Prints a collection of maps in a textual table. Prints table headings
    ks, and then a line of output for each row, corresponding to the keys
    in ks. If ks are not specified, use the keys of the first item in rows.
    macroPrivate
    (prlabel prefix arg & more-args)
    Print args to *err* in name = value format
    
    Private
    (process-bracket this remainder)
    Private
    (process-clause bracket-info offset remainder)
    Private
    (process-directive-table-element [char params flags bracket-info & generator-fn])
    Private
    (process-nesting format)
    Take a linearly compiled format and process the bracket directives to give it 
    the appropriate tree structure
    Private
    (readable-character params navigator offsets)
    Private
    (realize-parameter [param [raw-val offset]] navigator)
    Private
    (realize-parameter-list parameter-map navigator)
    Private
    (relative-reposition navigator position)
    Private
    (relative-tabulation params navigator offsets)
    Private
    (remainders base val)
    Return the list of remainders (essentially the 'digits') of val in the given base
    
    Private
    (render-clauses clauses navigator base-navigator)
    Private
    (right-bracket this)
    Private
    (round-str m e d w)
    Private
    (rtrim s c)
    Trim all instances of c from the end of sequence s
    
    Private
    (separator? this)
    Private
    (set-field this sym new-val)
    Private
    (set-indent params navigator offsets)
    Private
    (set-logical-block-callback this f)
    Private
    (set-max-column this new-max)
    Private
    (set-miser-width this new-miser-width)
    (set-pprint-dispatch function)
    Set the pretty print dispatch function to a function matching (fn [obj] ...)
    where obj is the object to pretty print. That function will be called with *out* set
    to a pretty printing writer to which it should do its printing.
    
    For example functions, see simple-dispatch and code-dispatch in 
    clojure.pprint.dispatch.clj.
    macroPrivate
    (setf sym new-val)
    Set the value of the field SYM to NEW-VAL
    
    multimethod
    (simple-dispatch object)
    The pretty print dispatch function for simple data structure format.
    
    Private
    (single-defn alis has-doc-str?)
    Private
    (split-at-newline tokens)
    Private
    (start-block this prefix per-line-prefix suffix)
    Private
    (start-block-t? x__9503__auto__)
    Private
    (table-ize t m)
    multimethodPrivate
    Private
    (tokens-fit? this tokens)
    Private
    (toks toks)
    Private
    (translate-param [p offset])
    Translate the string representation of a param to the internalized
    representation
    Private
    (tuple-map m v1)
    For all the values, v, in the map, replace them with [v v1]
    
    Private
    (two-forms amap)
    Private
    (unzip-map m)
    Take a map that has pairs in the value slots and produce a pair of
    maps, the first having all the first elements of the pairs and the
    second all the second elements of the pairs
    Private
    (upcase-writer writer)
    Returns a proxy that wraps writer, converting all characters to upper case
    
    Private
    (update-nl-state lb)
    Private
    (use-method multifn dispatch-val func)
    Installs a function as a new method of multimethod associated with dispatch-value. 
    
    macro
    (with-pprint-dispatch function & body)
    Execute body with the pretty print dispatch function bound to function.
    
    macroPrivate
    (with-pretty-writer base-writer & body)
    (write object & kw-args)
    Write an object subject to the current bindings of the printer control variables.
    Use the kw-args argument to override individual variables for this call (and any 
    recursive calls). Returns the string result if :stream is nil or nil otherwise.
    
    The following keyword arguments can be passed with values:
      Keyword              Meaning                              Default value
      :stream              Writer for output or nil             true (indicates *out*)
      :base                Base to use for writing rationals    Current value of *print-base*
      :circle*             If true, mark circular structures    Current value of *print-circle*
      :length              Maximum elements to show in sublists Current value of *print-length*
      :level               Maximum depth                        Current value of *print-level*
      :lines*              Maximum lines of output              Current value of *print-lines*
      :miser-width         Width to enter miser mode            Current value of *print-miser-width*
      :dispatch            The pretty print dispatch function   Current value of *print-pprint-dispatch*
      :pretty              If true, do pretty printing          Current value of *print-pretty*
      :radix               If true, prepend a radix specifier   Current value of *print-radix*
      :readably*           If true, print readably              Current value of *print-readably*
      :right-margin        The column for the right margin      Current value of *print-right-margin*
      :suppress-namespaces If true, no namespaces in symbols    Current value of *print-suppress-namespaces*
    
      * = not yet supported
    Private
    (write-buffered-output this)
    Private
    (write-initial-lines this s)
    Private
    (write-line this)
    (write-out object)
    Write an object to *out* subject to the current bindings of the printer control 
    variables. Use the kw-args argument to override individual variables for this call (and 
    any recursive calls).
    
    *out* must be a PrettyWriter if pretty printing is enabled. This is the responsibility
    of the caller.
    
    This method is primarily intended for use by pretty print dispatch functions that 
    already know that the pretty printer will have set up their environment appropriately.
    Normal library clients should use the standard "write" interface. 
    macroPrivate
    (write-to-base & args)
    Call .write on Writer (getf :base) with proper type-hinting to
    avoid reflection.
    multimethodPrivate
    Private
    (write-token-string this tokens)
    Private
    (write-tokens this tokens force-trailing-whitespace)
    Private
    (write-white-space this)