Visitar URL original
Agda 2.9.0 release candidate 3 (including tests) by andreasabel · Pull Request #8891 · agda/agda · GitHub
Skip to content

Agda 2.9.0 release candidate 3 (including tests) - #8891

Open
andreasabel wants to merge 11 commits into
release-2.9.0-rc3-basefrom
release-2.9.0
Open

andreasabel wants to merge 11 commits into
release-2.9.0-rc3-basefrom
release-2.9.0

Conversation

@andreasabel

@andreasabel andreasabel commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Agda 2.9.0 release candidate 3 (including tests)

Commits (over RC2):

Closes #8858

<details>
<summary>Claudesplanation</summary>

I implemented the suggested fix: after Give or Refine, `Cmd_highlight` no longer emits stale annotations. I confirmed the bug on an older binary (`agda-8811`, from early October), and the new test shows it gone with the patched build.

**Is the suggested fix reasonable?** Yes. The entries `give_gen` records in `stDisambiguatedNames` carry ranges inside the old goal. They are only correct for the highlighting `give_gen` does right away, while the text is still inside the goal. Once the goal is replaced by the expression, they point at the wrong place. A fresh reload starts with an empty map, so dropping them loses nothing that a reload would have. The issue's fallback options (removing entries by range, or skipping `generateConstructorInfo` in `Cmd_highlight`) only treat the symptom.

**The change** is in `give_gen` in `src/full/Agda/Interaction/InteractionTop.hs`:
```haskell
disambiguatedNames <- useTC stDisambiguatedNames
flip finally (setTCLens stDisambiguatedNames disambiguatedNames) $ unless (null s) $ do ...
```
- The map is saved on entry and restored at the end, after the immediate highlighting has used it. Every other state change Give or Refine makes is kept.
- `finally` also restores the map when the give fails with an error, so a failed attempt doesn't leave entries behind either.

**Test:** I added `test/Interaction/Issue8858.{agda,sh,out}`, which runs both reproductions from the issue in one file:
- **Give:** `con x y` on an ambiguous constructor. The old binary reports `x` as a constructor with `con`'s definition site; now `con` is a constructor and `x`, `y` are `bound`.
- **Refine:** a record expression. The old binary returns `(103 105 (field)) (105 106 …) (106 108 …)`; now it returns just `(103 106 (field)) (113 116 (field))`.

</summary>
`a ≤ b₁ ⊔ ... ⊔ bₙ` and `bᵢ ≤ a` for all `i` give `a = b₁ ⊔ ... ⊔ bₙ`.

Implemented by Claude.

Closes #8881.
When splitting x :^μ on c : (y :^ν C) → D, the new variable y has
modality μ∘ν in the context, but the pattern c y^ν has to carry the
field's own modality ν, as in Coverage.  checkLHS used the composed
modality for the pattern as well, and patternToTerm copied it into the
term c y that replaces x, e.g. in as-patterns and types.

Such ill-annotated terms were rejected by CheckInternal, i.e. by
--double-check and also by with-abstraction without --double-check:
- cohesion, polarity: __IMPOSSIBLE__ in checkModality
- erasure: spurious QuantityMismatch

Fix by Claude Opus 5.5.

Closes #8888.
@andreasabel andreasabel added this to the 2.9.0 milestone Nov 4, 2026
@andreasabel andreasabel added status: do-not-merge So please don't merge release Concerning the release process and releases (not in changelog) labels Nov 4, 2026
andreasabel and others added 5 commits November 10, 2026 21:26
Repeatedly dividing even numbers by 2 might just not terminate.  That pesky 0.

Fixed manually.

Closes #8898.
And I say [ecosystem] !
Now the following approach is taken (this text is copied from the
documentation of agda2-maybe-goto):

If `agda2-highlight-in-progress' is `nil', or if the selected
window does not visit (does not contain a buffer that visits)
`agda2-file-buffer', then nothing happens.

Otherwise:
* If the selected window visits FILE, or if no visible window
  visits FILE, then the selected window is made to visit FILE,
  and point is set to POSITION.
* Otherwise point is set to POSITION in every visible window that
  visits FILE.
@andreasabel

andreasabel commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Updating this PR for the final release candidate: https://hackage.haskell.org/package/Agda-2.9.0/candidate

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Concerning the release process and releases (not in changelog) status: do-not-merge So please don't merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants