* fix doc generation for functions decorated with @@ spice-quote
M doc/build_reference.sc +15 -5
@@ 61,7 61,7 @@ fn entry-key (x)
     let s = (key as string)
     ..
         do
-            if (T == Closure) "C"
+            if ((T == Closure) or ((T == Unknown) and (('kind entry) == value-kind-template))) "C"
             elseif (T == Builtin) "E"
             elseif (T == SugarMacro) "D"
             elseif (T == SpiceMacro) "F"

          
@@ 178,11 178,21 @@ fn print-entry (module parent key entry 
             io-write! docstr
         io-write! "\n"
         return;
-    if (T == Closure)
-        let func = (entry as Closure)
-        let docstr2 = ('docstring func)
+
+    let is-unwrapped-closure? = ((T == Unknown) and (('kind entry) == value-kind-template))
+    if (T == Closure or is-unwrapped-closure?)
+        let docstr2 =
+            if is-unwrapped-closure?
+                ""
+            else
+                ('docstring (entry as Closure))
+
         let label =
-            sc_closure_get_template func
+            if is-unwrapped-closure?
+                entry
+            else
+                (sc_closure_get_template (entry as Closure))
+
         if (docstring-is-complete docstr2)
             io-write! docstr2
             io-write! "\n"

          
M doc/docs/module-Array.md +57 -57
@@ 1,10 1,10 @@ 
 <style type="text/css" rel="stylesheet">body { counter-reset: chapter 7; }</style>
 
-Array
-=====
-
-Provides mutable array types that store their elements on the heap rather
-than in registers or the stack.
+Array
+=====
+
+Provides mutable array types that store their elements on the heap rather
+than in registers or the stack.
 
 *type*{.property} `Array`{.descname} [](#scopes.type.Array "Permalink to this definition"){.headerlink} {#scopes.type.Array}
 

          
@@ 12,69 12,69 @@ than in registers or the stack.
 
     *fn*{.property} `__@`{.descname} (*&ensp;self index&ensp;*)[](#scopes.Array.fn.__@ "Permalink to this definition"){.headerlink} {#scopes.Array.fn.__@}
 
-    :   Implements support for the `@` operator. Returns a view reference to the
-        element at `index` of array `self`.
+    :   Implements support for the `@` operator. Returns a view reference to the
+        element at `index` of array `self`.
 
     *inline*{.property} `__as`{.descname} (*&ensp;cls T&ensp;*)[](#scopes.Array.inline.__as "Permalink to this definition"){.headerlink} {#scopes.Array.inline.__as}
 
-    :   Implements support for the `as` operator. Arrays can be cast to
-        `Generator`, or directly passed to `for`.
+    :   Implements support for the `as` operator. Arrays can be cast to
+        `Generator`, or directly passed to `for`.
 
     *inline*{.property} `__countof`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.inline.__countof "Permalink to this definition"){.headerlink} {#scopes.Array.inline.__countof}
 
-    :   Implements support for the `countof` operator. Returns the current
-        number of elements stored in `self` as a value of `usize` type.
+    :   Implements support for the `countof` operator. Returns the current
+        number of elements stored in `self` as a value of `usize` type.
 
     *inline*{.property} `__drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.inline.__drop "Permalink to this definition"){.headerlink} {#scopes.Array.inline.__drop}
 
-    :   Implements support for freeing the array's memory when it goes out
-        of scope.
+    :   Implements support for freeing the array's memory when it goes out
+        of scope.
 
     *inline*{.property} `__imply`{.descname} (*&ensp;cls T&ensp;*)[](#scopes.Array.inline.__imply "Permalink to this definition"){.headerlink} {#scopes.Array.inline.__imply}
 
-    :   Implements support for pointer casts, to pass the array to C functions
-        for example.
+    :   Implements support for pointer casts, to pass the array to C functions
+        for example.
 
     *inline*{.property} `__typecall`{.descname} (*&ensp;cls element-type capacity&ensp;*)[](#scopes.Array.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.Array.inline.__typecall}
 
-    :   Construct a mutable array type of ``element-type`` with a variable or
-        fixed maximum capacity.
-        
-        If ``capacity`` is defined, then it specifies the maximum number
-        of array elements permitted. If it is undefined, then an initial
-        capacity of 16 elements is assumed, which is doubled whenever
-        it is exceeded, allowing for an indefinite number of elements.
+    :   Construct a mutable array type of `element-type` with a variable or
+        fixed maximum capacity.
+        
+        If `capacity` is defined, then it specifies the maximum number
+        of array elements permitted. If it is undefined, then an initial
+        capacity of 16 elements is assumed, which is doubled whenever
+        it is exceeded, allowing for an indefinite number of elements.
 
     *fn*{.property} `append`{.descname} (*&ensp;self value&ensp;*)[](#scopes.Array.fn.append "Permalink to this definition"){.headerlink} {#scopes.Array.fn.append}
 
-    :   Append `value` as an element to the array `self` and return a reference
-        to the new element. When the `array` is of `GrowingArray` type, this
-        operation will transparently resize the array's storage.
+    :   Append `value` as an element to the array `self` and return a reference
+        to the new element. When the `array` is of `GrowingArray` type, this
+        operation will transparently resize the array's storage.
 
     *fn*{.property} `clear`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.fn.clear "Permalink to this definition"){.headerlink} {#scopes.Array.fn.clear}
 
-    :   Clear the array and reset its element count to zero. This will drop
-        all elements that have been previously contained by the array.
+    :   Clear the array and reset its element count to zero. This will drop
+        all elements that have been previously contained by the array.
 
     *inline*{.property} `emplace-append`{.descname} (*&ensp;self args...&ensp;*)[](#scopes.Array.inline.emplace-append "Permalink to this definition"){.headerlink} {#scopes.Array.inline.emplace-append}
 
-    :   Construct a new element with arguments `args...` directly in a newly
-        assigned slot of array `self`. When the `array` is of `GrowingArray`
-        type, this operation will transparently resize the array's storage.
+    :   Construct a new element with arguments `args...` directly in a newly
+        assigned slot of array `self`. When the `array` is of `GrowingArray`
+        type, this operation will transparently resize the array's storage.
 
     *inline*{.property} `emplace-append-many`{.descname} (*&ensp;self size args...&ensp;*)[](#scopes.Array.inline.emplace-append-many "Permalink to this definition"){.headerlink} {#scopes.Array.inline.emplace-append-many}
 
-    :   Construct a new element with arguments `args...` directly in a newly
-        assigned slot of array `self`. When the `array` is of `GrowingArray`
-        type, this operation will transparently resize the array's storage.
+    :   Construct a new element with arguments `args...` directly in a newly
+        assigned slot of array `self`. When the `array` is of `GrowingArray`
+        type, this operation will transparently resize the array's storage.
 
     *type*{.property} `insert`{.descname} [](#scopes.Array.type.insert "Permalink to this definition"){.headerlink} {#scopes.Array.type.insert}
 
-    :   Insert `value` at `index` into the array `self` and return a reference
-        to the new element. When the `array` is of `GrowingArray` type, this
-        operation will transparently resize the array's storage.
-        This operation offsets the index of each following element by 1.
-        If index is omitted, `insert` operates like `append`.
+    :   Insert `value` at `index` into the array `self` and return a reference
+        to the new element. When the `array` is of `GrowingArray` type, this
+        operation will transparently resize the array's storage.
+        This operation offsets the index of each following element by 1.
+        If index is omitted, `insert` operates like `append`.
 
     *fn*{.property} `last`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.fn.last "Permalink to this definition"){.headerlink} {#scopes.Array.fn.last}
 

          
@@ 82,17 82,17 @@ than in registers or the stack.
 
     *fn*{.property} `pop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.fn.pop "Permalink to this definition"){.headerlink} {#scopes.Array.fn.pop}
 
-    :   Remove element with highest index from array `self` and return it.
+    :   Remove element with highest index from array `self` and return it.
 
     *fn*{.property} `remove`{.descname} (*&ensp;self index&ensp;*)[](#scopes.Array.fn.remove "Permalink to this definition"){.headerlink} {#scopes.Array.fn.remove}
 
-    :   Remove element at index from array `self` and return it.
-        This operation offsets the index of each following element by -1.
+    :   Remove element at index from array `self` and return it.
+        This operation offsets the index of each following element by -1.
 
     *fn*{.property} `resize`{.descname} (*&ensp;self count args...&ensp;*)[](#scopes.Array.fn.resize "Permalink to this definition"){.headerlink} {#scopes.Array.fn.resize}
 
-    :   Resize the array to the specified count. Items are apppend or removed
-        to meet the desired count.
+    :   Resize the array to the specified count. Items are apppend or removed
+        to meet the desired count.
 
     *inline*{.property} `reverse`{.descname} (*&ensp;self&ensp;*)[](#scopes.Array.inline.reverse "Permalink to this definition"){.headerlink} {#scopes.Array.inline.reverse}
 

          
@@ 100,14 100,14 @@ than in registers or the stack.
 
     *inline*{.property} `sort`{.descname} (*&ensp;self key ...&ensp;*)[](#scopes.Array.inline.sort "Permalink to this definition"){.headerlink} {#scopes.Array.inline.sort}
 
-    :   Sort elements of array `self` from smallest to largest, either using
-        the `<` operator supplied by the element type, or by using the key
-        supplied by the callable `key`, which is expected to return a comparable
-        value for each element value supplied.
+    :   Sort elements of array `self` from smallest to largest, either using
+        the `<` operator supplied by the element type, or by using the key
+        supplied by the callable `key`, which is expected to return a comparable
+        value for each element value supplied.
 
     *fn*{.property} `swap`{.descname} (*&ensp;self a b&ensp;*)[](#scopes.Array.fn.swap "Permalink to this definition"){.headerlink} {#scopes.Array.fn.swap}
 
-    :   Safely swap the contents of two indices.
+    :   Safely swap the contents of two indices.
 
 *type*{.property} `FixedArray`{.descname} [](#scopes.type.FixedArray "Permalink to this definition"){.headerlink} {#scopes.type.FixedArray}
 

          
@@ 115,7 115,7 @@ than in registers or the stack.
 
     *fn*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.FixedArray.fn.__repr "Permalink to this definition"){.headerlink} {#scopes.FixedArray.fn.__repr}
 
-    :   Implements support for the `repr` operation.
+    :   Implements support for the `repr` operation.
 
     *inline*{.property} `__typecall`{.descname} (*&ensp;cls opts...&ensp;*)[](#scopes.FixedArray.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.FixedArray.inline.__typecall}
 

          
@@ 123,13 123,13 @@ than in registers or the stack.
 
     *inline*{.property} `capacity`{.descname} (*&ensp;self&ensp;*)[](#scopes.FixedArray.inline.capacity "Permalink to this definition"){.headerlink} {#scopes.FixedArray.inline.capacity}
 
-    :   Returns the maximum capacity of array `self`, which is fixed.
+    :   Returns the maximum capacity of array `self`, which is fixed.
 
     *fn*{.property} `reserve`{.descname} (*&ensp;self count&ensp;*)[](#scopes.FixedArray.fn.reserve "Permalink to this definition"){.headerlink} {#scopes.FixedArray.fn.reserve}
 
-    :   Internally used by the type. Ensures that array `self` can hold at least
-        `count` elements. A fixed array will raise an assertion when its
-        capacity has been exceeded.
+    :   Internally used by the type. Ensures that array `self` can hold at least
+        `count` elements. A fixed array will raise an assertion when its
+        capacity has been exceeded.
 
 *type*{.property} `GrowingArray`{.descname} [](#scopes.type.GrowingArray "Permalink to this definition"){.headerlink} {#scopes.type.GrowingArray}
 

          
@@ 137,7 137,7 @@ than in registers or the stack.
 
     *fn*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.GrowingArray.fn.__repr "Permalink to this definition"){.headerlink} {#scopes.GrowingArray.fn.__repr}
 
-    :   Implements support for the `repr` operation.
+    :   Implements support for the `repr` operation.
 
     *inline*{.property} `__typecall`{.descname} (*&ensp;cls opts...&ensp;*)[](#scopes.GrowingArray.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.GrowingArray.inline.__typecall}
 

          
@@ 145,10 145,10 @@ than in registers or the stack.
 
     *inline*{.property} `capacity`{.descname} (*&ensp;self&ensp;*)[](#scopes.GrowingArray.inline.capacity "Permalink to this definition"){.headerlink} {#scopes.GrowingArray.inline.capacity}
 
-    :   Returns the current maximum capacity of array `self`.
+    :   Returns the current maximum capacity of array `self`.
 
     *fn*{.property} `reserve`{.descname} (*&ensp;self count&ensp;*)[](#scopes.GrowingArray.fn.reserve "Permalink to this definition"){.headerlink} {#scopes.GrowingArray.fn.reserve}
 
-    :   Internally used by the type. Ensures that array `self` can hold at least
-        `count` elements. A growing array will always attempt to comply.
+    :   Internally used by the type. Ensures that array `self` can hold at least
+        `count` elements. A growing array will always attempt to comply.
 

          
M doc/docs/module-Map.md +16 -0
@@ 72,3 72,19 @@ This module implements a key -> value st
 
 :   An unique type of supertype `Enum` and of storage type `(tuple u8 (tuple (vector i8 1)))`.
 
+    *inline*{.property} `__==`{.descname} (*&ensp;A B&ensp;*)[](#scopes.MapError.inline.__== "Permalink to this definition"){.headerlink} {#scopes.MapError.inline.__==}
+
+    :   
+
+    *fn*{.property} `__drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.MapError.fn.__drop "Permalink to this definition"){.headerlink} {#scopes.MapError.fn.__drop}
+
+    :   
+
+    *fn*{.property} `__hash`{.descname} (*&ensp;self&ensp;*)[](#scopes.MapError.fn.__hash "Permalink to this definition"){.headerlink} {#scopes.MapError.fn.__hash}
+
+    :   
+
+    *fn*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.MapError.fn.__repr "Permalink to this definition"){.headerlink} {#scopes.MapError.fn.__repr}
+
+    :   
+

          
M doc/docs/module-core.md +40 -0
@@ 2052,6 2052,10 @@ parses the command-line and optionally e
 
 :   An opaque type of supertype `aggregate`.
 
+    *inline*{.property} `__==`{.descname} (*&ensp;cls T&ensp;*)[](#scopes.tuple.inline.__== "Permalink to this definition"){.headerlink} {#scopes.tuple.inline.__==}
+
+    :   
+
     *builtin*{.property} `__@`{.descname} (*&ensp;...&ensp;*)[](#scopes.tuple.builtin.__@ "Permalink to this definition"){.headerlink} {#scopes.tuple.builtin.__@}
 
     :   

          
@@ 2694,6 2698,26 @@ parses the command-line and optionally e
 
 :   
 
+*inline*{.property} `compile`{.descname} (*&ensp;func flags...&ensp;*)[](#scopes.inline.compile "Permalink to this definition"){.headerlink} {#scopes.inline.compile}
+
+:   
+
+*inline*{.property} `compile-glsl`{.descname} (*&ensp;version target func flags...&ensp;*)[](#scopes.inline.compile-glsl "Permalink to this definition"){.headerlink} {#scopes.inline.compile-glsl}
+
+:   
+
+*inline*{.property} `compile-object`{.descname} (*&ensp;target file-kind path table flags...&ensp;*)[](#scopes.inline.compile-object "Permalink to this definition"){.headerlink} {#scopes.inline.compile-object}
+
+:   
+
+*inline*{.property} `compile-spirv`{.descname} (*&ensp;target func flags...&ensp;*)[](#scopes.inline.compile-spirv "Permalink to this definition"){.headerlink} {#scopes.inline.compile-spirv}
+
+:   
+
+*fn*{.property} `compiler-version-string`{.descname} ()[](#scopes.fn.compiler-version-string "Permalink to this definition"){.headerlink} {#scopes.fn.compiler-version-string}
+
+:   
+
 *inline*{.property} `convert-assert-args`{.descname} (*&ensp;args cond msg&ensp;*)[](#scopes.inline.convert-assert-args "Permalink to this definition"){.headerlink} {#scopes.inline.convert-assert-args}
 
 :   

          
@@ 3004,6 3028,10 @@ parses the command-line and optionally e
 
 :   
 
+*fn*{.property} `print-logo`{.descname} ()[](#scopes.fn.print-logo "Permalink to this definition"){.headerlink} {#scopes.fn.print-logo}
+
+:   
+
 *fn*{.property} `ptrcmp!=`{.descname} (*&ensp;t1 t2&ensp;*)[](#scopes.fn.ptrcmp!= "Permalink to this definition"){.headerlink} {#scopes.fn.ptrcmp!=}
 
 :   

          
@@ 3136,6 3164,18 @@ parses the command-line and optionally e
 
 :   
 
+*inline*{.property} `static-compile`{.descname} (*&ensp;func flags...&ensp;*)[](#scopes.inline.static-compile "Permalink to this definition"){.headerlink} {#scopes.inline.static-compile}
+
+:   
+
+*inline*{.property} `static-compile-glsl`{.descname} (*&ensp;version target func flags...&ensp;*)[](#scopes.inline.static-compile-glsl "Permalink to this definition"){.headerlink} {#scopes.inline.static-compile-glsl}
+
+:   
+
+*inline*{.property} `static-compile-spirv`{.descname} (*&ensp;target func flags...&ensp;*)[](#scopes.inline.static-compile-spirv "Permalink to this definition"){.headerlink} {#scopes.inline.static-compile-spirv}
+
+:   
+
 *fn*{.property} `string@`{.descname} (*&ensp;self i&ensp;*)[](#scopes.fn.string@ "Permalink to this definition"){.headerlink} {#scopes.fn.string@}
 
 :   

          
M doc/docs/module-glm.md +12 -0
@@ 223,6 223,10 @@ written in the GL shader language.
 
     :   
 
+    *fn*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.mat-type.fn.__repr "Permalink to this definition"){.headerlink} {#scopes.mat-type.fn.__repr}
+
+    :   
+
     *spice*{.property} `__typecall`{.descname} (*&ensp;...&ensp;*)[](#scopes.mat-type.spice.__typecall "Permalink to this definition"){.headerlink} {#scopes.mat-type.spice.__typecall}
 
     :   

          
@@ 491,6 495,10 @@ written in the GL shader language.
 
     :   
 
+    *fn*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.vec-type.fn.__repr "Permalink to this definition"){.headerlink} {#scopes.vec-type.fn.__repr}
+
+    :   
+
     *spice*{.property} `__rimply`{.descname} (*&ensp;...&ensp;*)[](#scopes.vec-type.spice.__rimply "Permalink to this definition"){.headerlink} {#scopes.vec-type.spice.__rimply}
 
     :   

          
@@ 531,6 539,10 @@ written in the GL shader language.
 
 :   
 
+*inline*{.property} `transpose`{.descname} (*&ensp;m&ensp;*)[](#scopes.inline.transpose "Permalink to this definition"){.headerlink} {#scopes.inline.transpose}
+
+:   
+
 *spice*{.property} `mix`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.mix "Permalink to this definition"){.headerlink} {#scopes.spice.mix}
 
 :   

          
M doc/docs/module-itertools.md +16 -0
@@ 14,6 14,11 @@ generators and collectors.
 
 :   
 
+*inline*{.property} `bitdim`{.descname} (*&ensp;x n...&ensp;*)[](#scopes.inline.bitdim "Permalink to this definition"){.headerlink} {#scopes.inline.bitdim}
+
+:   a variant of dim optimized for power of two sizes; the dimensions are
+    specified as exponents of 2
+
 *inline*{.property} `cascade`{.descname} (*&ensp;collector...&ensp;*)[](#scopes.inline.cascade "Permalink to this definition"){.headerlink} {#scopes.inline.cascade}
 
 :   two collectors:

          
@@ 32,6 37,10 @@ generators and collectors.
 
 :   
 
+*inline*{.property} `dim`{.descname} (*&ensp;x n...&ensp;*)[](#scopes.inline.dim "Permalink to this definition"){.headerlink} {#scopes.inline.dim}
+
+:   a branchless generator that iterates multidimensional coordinates
+
 *inline*{.property} `each`{.descname} (*&ensp;generator collector&ensp;*)[](#scopes.inline.each "Permalink to this definition"){.headerlink} {#scopes.inline.each}
 
 :   fold output from generator into collector

          
@@ 83,6 92,13 @@ generators and collectors.
 
 :   
 
+*inline*{.property} `retain`{.descname} (*&ensp;mapl ...&ensp;*)[](#scopes.inline.retain "Permalink to this definition"){.headerlink} {#scopes.inline.retain}
+
+:   feeds the input through a composition of collectors and feeds the
+    input along with the composition output to the next collector.
+    if mapl is not none, it allows to specify the portion of the input that
+    will be passed to the end point.
+
 *inline*{.property} `take`{.descname} (*&ensp;n coll&ensp;*)[](#scopes.inline.take "Permalink to this definition"){.headerlink} {#scopes.inline.take}
 
 :   limit collector to output n items