Repository navigation
feat(emit): in over a list asks its elements the == they have - #362
Merged
Merged
Conversation
`x in xs` was built for the elements C compares and refused, as E9061,
for a container and for a declared type that carries an `Eq` — an
equality that was there and that nothing called. Since #295 every one
of them has a comparison `==` already writes, so the scan asks it:
- an aggregate element goes through c_eq_pair, with the value looked
for on the left of each comparison
- the list and the value are held across the scan when it runs the
program's own `eq`, which may abort
- an unnamed element with a part of no equality is refused for that
part, under the code `==` gives it, in the words of `in`
- a map and a set hash rather than compare, so an aggregate key is
asked of c_hashed_check and answers E9052, as the map itself does
E9061 retires: its rule, its table row (en and zh-TW) and its two
refuse cases go together, and the hash half is pinned in their place.
Closes #358.
Bumps test-data for codegen/in_over_parts: lists of lists, tuples,
maps and declared types looked in, with a written `eq` that prints
its order and one that aborts under a `guard`.
…compare
Three reject cases, one for each class a part can be in, each holding
the sentence as well as the code. A mem-check case holds what `in`
gives back over a list of lists, tuples, maps and a declared type:
shown red with the value's give-back removed.
The `[not yet]` said the gap would retire with container equality,
and it had not. What is left unbuilt is the hash half, which the
note now names with the code it answers under.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #358.
What
x in xsover a list now asks each element the==it has. A declared type goes through itsEq, and acontainer, a tuple or an array compares by its parts — the comparison #295 built and
indid not call.E9061retires.Decisions made here
x in xsasksx.eq(e), and stops at thefirst match. It only shows with a hand-written
eq; the corpus case prints the order.E9052, not a new code. They hash rather than compare, andan aggregate has no
Hashhere. That half ofE9061was never an equality gap, andE9052is the number amap built with such a key already had.
==gives it(
E4020,E4038,E4034), in the words ofin.Verified
mem-check oracle corpus sanitize-corpus mem-peak examples docs-mirror docs-links docs-zerg docs-refused
docs-repeat marker-codes chapter-codes deviation-check refusal-cites method-gaps gates treesitter dead-code
stdlib-test compiler-test check-equal reject-fuzz fmt-corpus behaviour conformance productions suites desugar.
refuse,rejectandmem-checkalso under/bin/bash.mem-checkcase was red with the value's give-back removed (5850 per round), green after.leaks --atExiton the corpus case reports oneleak; none with them.
Not verified
make testas one board was not run.make lspwas not run: it fails on this machine for the reason inzrt_listdirsorts by insertion: a large directory costs its square, andmake lspfails under a crowded$TMPDIR#361, which this change does not touch.🤖 Generated with Claude Code
https://claude.ai/code/session_01N8jd1oK2orM6diHxhvWhC7