agda 2.9.0 #319405
Agda2hs and ALS need more substantial compatibility fixes than just raising the bounds in their cabal files and hoping for the best; we think it may be best to wait at least until a commit appears upstream for each that resolves these issues, and we will be on the lookout for that.
The categories library also needs more extensive fixing for compatibility with Agda 2.9.0, and we'd rather not ship an unreleased version even if it appears to work right now.
EDIT: ALS has a new version that's compatible now! Still waiting on Agda2hs and categories.
agda/agda2hs#474 landed!
So agda2hs Git main branch can compile with Agda 2.9.0 (I tested with this Stack nightly resolver:
resolver: nightly-2026-11-14
compiler: ghc-9.12.4
compiler-check: match-exact
# Local packages specified by relative directory name.
packages:
- '.'
However, I think the official agda2hs v1.5 release is waiting for nix to upgrade to Agda 2.9.0.
This line currently fails because agda/agda-categories@ade267a5a02688fb97ec9d6e03ab6192be94439e has bumped stdlib to standard-library-2.4
Oh, wow. It currently fails on x86_64 Linux with a heap exhaustion error! 4GiB is apparently not sufficient anymore. We don't know what the preferred resolution for that should be.
Ah, I've seen this on my machine. The default memory size for agda-stdlib (and perhaps for agda-categories as well) is too small for parallel builds, so not using -jNNN should fix it. But I don't know how much is needed for parallel builds.
It appears 6GiB is sufficient for stdlib; fix applied. Now resizing for categories.
EDIT: 12GiB is sufficient for categories. Also fixed some tests (and added a new one).
system bin/"agda", "--latex", "--count-clusters", textest
textest = testpath/"TeXTest.lagda"
textest.write <<~'AGDA'
\documentclass{article}
\usepackage{amsmath,newunicodechar}
\newunicodechar{∀}{$\forall$}
\newunicodechar{≤}{$\le$}
\newunicodechar{→}{$\to$}
\newunicodechar{≡}{$\equiv$}
\usepackage{agda}
\begin{document}
\begin{code}
{-# OPTIONS --safe --cubical-compatible #-}
module TeXTest where
infix 4 _≡_
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
cong : ∀ {A B : Set} (f : A → B) {x y} → x ≡ y → f x ≡ f y
cong f refl = refl
\end{code}
\end{document}
AGDA
To test the LaTeX backend, I think the Agda code needs to be wrapped inside code blocks
# Note in version string that agda2hs is development version (pre-1.5-release)
# Remove on actual agda2hs 1.5 release
agda2hs_revision_spec = resource("agda2hs").specs[:revision]&.slice(0, 7)
agda2hs_name_suffix = agda2hs_revision_spec ? "-dev" : ""
agda2hs_version_suffix = agda2hs_revision_spec ? "-#{agda2hs_revision_spec}" : ""
inreplace agda2hs_build/"src"/"Main.hs" do |s|
s.gsub!(
"backendName = \"agda2hs\"",
"backendName = \"agda2hs${agda2hs_name_suffix}\""
)
s.gsub! "showVersion version", "showVersion version ++ \"#{agda2hs_version_suffix}\""
end
(I am not familiar with Ruby, just trying to illustrate what I meant)
Thank you for the work!
To Test the LaTeX backend, I think some \begin{code}\end{code} TeX code is needed to activate Agda highlighting. The comments added an example.
When checking agda2hs 1.5 milestones, https://github.com/agda/agda2hs/milestone/6, I notice that there are still some pending changes. That makes me wonder whether the actual release will contain some other user-noticeable differences.
To avoid user confusion, would adding some "-dev" and revision hash to agda2hs --version help? I added some code trying to illustrate what I meant by this. The output looks like this:
$ agda2hs --version
Agda version 2.9.0
Built with flags (cabal -f)
- optimise-heavily: extra optimisations
- agda2hs-dev backend version 1.5-b3d4cc1
This seems to be a bad idea to us? This won't (and shouldn't) be merged until agda2hs, agda-categories, and cubical all have appropriate released tags, so this change would have to be undone anyway.
Ah sure! If the PR wait after agda2hs release then everything is good and I don't have worries.
Approved these changes.
SMillerDev
pthariensflame
-----
<!-- Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process. -->
<!-- Use [x] to mark item done before creation, or just click the checkboxes with device pointer after creation -->
<!-- In the following questions
<formula>is the name of the formula you're editing. -->HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?brew test <formula>?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?-----
<!-- If AI was used, explain below how it was used and how you verified the changes. Non-maintainers may only have one AI-assisted PR open at a time. See https://docs.brew.sh/Responsible-AI-Usage for guidance. -->
-----
~~Not ready yet, since there is still only a release candidate and the other components haven't had updated releases yet either. We figured we should make this available "early" so that any kinks can be worked out in advance of the actual release.~~ The official release of Agda 2.9.0 has been made now!
Currently blocking this PR:
agda2hsrelease~~- Released: https://github.com/agda/agda2hs/releases/tag/v1.5
agda-categoriesrelease- Tracking issue: https://github.com/agda/agda-categories/issues/529
cubicalrelease- Tracking issue: https://github.com/agda/cubical/issues/1338