tur/typeclass-show
the Show typeclass (owned String result) and its
Since: v2 (show-owned-result-plan, stage 4)
Show[int]
(definstance Show [int])
owned decimal String.
Show[cstr]
(definstance Show [cstr])
copy the borrowed cstr into a fresh owned String.
Show[bool]
(definstance Show [bool])
owned "true" / "false" String.
Show[int8]
(definstance Show [int8])
owned decimal String.
Show[int16]
(definstance Show [int16])
owned decimal String.
Show[int32]
(definstance Show [int32])
owned decimal String.
Show[uint8]
(definstance Show [uint8])
owned decimal String.
Show[uint16]
(definstance Show [uint16])
owned decimal String.
Show[uint32]
(definstance Show [uint32])
owned decimal String.
Show[uint64]
(definstance Show [uint64])
owned decimal String.
Show[float]
(definstance Show [float])
owned String rendering of a double.
Show[float32]
(definstance Show [float32])
owned String rendering of a float32.
Show[String]
(definstance Show [String])
O(1) retain (refcount++), a second owning handle.
Show[ptr<void>]
(definstance Show [ptr<void>])
render a result<T,E> carrier as an owned String.
vec-show-loop
(vec-show-loop [^Show A])
push "e0 e1 ..." element reprs into the builder.
Show[Vec]
(definstance Show [Vec])
render a Vec[A] as an owned "[a b c]" String.
(show (vec-of 1 2 3)) ; => String "[1 2 3]"
set-show-loop
(set-show-loop [^Show A])
push the space-separated element reprs into b.
Show[Set]
(definstance Show [Set])
render a Set[A] as an owned "#set{a b c}" String.
(show (set-of 1 2 3)) ; => String "#set{1 2 3}"
map-show-loop
(map-show-loop [^Show K ^Show V])
push the space-separated "k v" reprs into b.
Show[Map]
(definstance Show [Map])
render a Map[K V] as an owned "#map{k1 v1 k2 v2}" String.
(show (hamt-of 1 10 2 20)) ; => String "#map{1 10 2 20}"
Show[Sym]
(definstance Show [Sym])
render an interned symbol as an owned ":name" String.
(show :hello) ; => String ":hello"
show-string-fputs
(show-string-fputs [s : cstr])
internal: write a cstr to stdout with no newline.
print-show
(print-show [^Show a])
render x via Show and print it (no trailing newline).
(print-show 42) ; prints: 42
Since: v2 (show-owned-result-plan)
show-line
(show-line [^Show a])
render x via Show and print it with a trailing newline.
(show-line 42) ; prints: 42\n
Since: v2 (show-owned-result-plan)