Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_≡⟨⟩_ not working anymore on stdlib 2.0 #2298

Closed
wgbusch opened this issue Feb 20, 2024 · 5 comments
Closed

_≡⟨⟩_ not working anymore on stdlib 2.0 #2298

wgbusch opened this issue Feb 20, 2024 · 5 comments

Comments

@wgbusch
Copy link

wgbusch commented Feb 20, 2024

Hey, Im using this example from the PLFA book:

_ : 2 + 3 ≡ 5
_ =
  begin
    2 + 3
  ≡⟨⟩    -- is shorthand for
    (suc (suc zero)) + (suc (suc (suc zero)))
  ≡⟨⟩    -- inductive case
    suc ((suc zero) + (suc (suc (suc zero))))
  ≡⟨⟩    -- inductive case
    suc (suc (zero + (suc (suc (suc zero)))))
  ≡⟨⟩    -- base case
    suc (suc (suc (suc (suc zero))))
  ≡⟨⟩    -- is longhand for
    5
  ∎

but it seems that v2.0 completely broke this chain of equations. This is the commit. I don't really know much about Agda but I noticed you moved/removed the operator ≡⟨⟩ from the library. What's the replacement (if any) and how to fix? Thank you.

@Taneb
Copy link
Member

Taneb commented Feb 20, 2024

Thanks for the report!

I just looked into this. The underlying issue isn't that _≡⟨⟩_ has been removed, but that it's now declared as a syntax for a different name, which breaks opening the ≡-Reasoning module with only some names as PLFA instructs. I agree this is unfortunate.

In the meantime, you can replace open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) with open Eq.≡-Reasoning using (begin_; step-≡-∣; _∎). The convention in stdlib is to not use a using clause on the various Reasoning modules, which is why we hadn't noticed until now.

@gallais
Copy link
Member

gallais commented Feb 20, 2024

PLFA insists that you should use specific versions of Agda & its standard library precisely because they are trying to protect users against these kind of breaking changes:

PLFA is tested against specific versions of Agda and the standard library, which are shown in the badges above. Agda and the standard library change rapidly, and these changes often break PLFA, so using older or newer versions usually causes problems. (...) Therefore, it’s important to have the specific versions of Agda and the standard library shown above.

@MatthewDaggitt
Copy link
Contributor

Opened an issue upstream at agda/agda#7137

@jamesmckinna
Copy link
Contributor

jamesmckinna commented Mar 7, 2024

Suggest we close this now? Given that PLFA provides an answer, and the upstream Agda issue it has given rise to?
Not sure how we should label it though, if at all?

@JacquesCarette
Copy link
Contributor

I agree, there is nothing to do on stdlib about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants