The two compositions the milestone owed, pinned, and the record of the whole lane. A package whose exports are generic: pkgs/gen, imported by pkg-generic.flan at three shapes. One generic at two element types. One that calls another in its own package at its own variable, so the transitive copy is generated from a call site two files away. And a generic written in the program calling one written in the package at its own $t, which only resolves once Load has flattened both bodies into one namespace -- the thing that has to change the day a package becomes a real compilation unit, because a copy is made from a body and a body that did not cross cannot be copied. Plus the call-site half of a bound written in another file, quoted here rather than pointed at in a file the caller cannot change. And the composition with the widening trial. A binary operator re-checks its right operand at its left one's type inside a trial, so a generic call written there is checked twice and once thrown away. The discarded pass's instantiation does not go back out: instantiate rewinds a copy whose *body* refused, which is a different event. It does not have to, and the reason is this lane's own rule rather than luck -- a generic call's instantiation is read off its arguments and never off the ambient want, so both passes ask for the same types and the second ask is a cache hit. Pinned by counting the copies in the checked program. The widening lane's note said that cache already rewinds itself. It does not. Corrected in the comment and in FIX.org, in place.
13 lines
487 B
Plaintext
13 lines
487 B
Plaintext
;;;; The call-site half of a bound written in another file.
|
|
;;;;
|
|
;;;; gen/largest is {:where (ordered? $t)}, and a [string] is not ordered. The
|
|
;;;; refusal has to arrive here, against the call that asked for the copy, and
|
|
;;;; it has to quote the clause — a message pointing into pkgs/gen/gen.flan
|
|
;;;; would be naming a line the caller did not write and cannot change.
|
|
(import gen "pkgs/gen")
|
|
|
|
(defn main [] i32
|
|
(let [ss ["a" "b"]]
|
|
(println (gen/largest (slice ss 0 2))))
|
|
0)
|