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

internal error in Agda, perhaps related to --rewriting #6338

Closed
jsiek opened this issue Nov 16, 2022 · 13 comments
Closed

internal error in Agda, perhaps related to --rewriting #6338

jsiek opened this issue Nov 16, 2022 · 13 comments
Labels
internal-error Concerning internal errors of Agda rewriting Rewrite rules, rewrite rule matching status: already-fixed
Milestone

Comments

@jsiek
Copy link

jsiek commented Nov 16, 2022

To reproduce the bug, go to the following repository:
https://github.com/jsiek/abstract-binding-trees
and checkout at the tag
agda-bug
Then process the file
src/rewriting/examples/Lambda.agda
which will produces the following error:

An internal error has occurred. Please report this as a bug.
Location of the error: __IMPOSSIBLE_VERBOSE__, called at src/full/Agda/TypeChecking/Monad/Signature.hs:703:32 in Agd-2.6.2-17c972f8:Agda.TypeChecking.Monad.Signature

The error goes away if a small change is made to the ABTPredicate.agda file. See the comment in that file.

@andreasabel
Copy link
Member

Thanks to the report @jsiek ! Which Agda version does this apply to?
Please try whether this is fixed by the release candidate for 2.6.3: https://hackage.haskell.org/package/Agda-2.6.2.2.20221106/candidate

@andreasabel andreasabel added rewriting Rewrite rules, rewrite rule matching internal-error Concerning internal errors of Agda status: info-needed More information is needed from the bug reporter to confirm the issue. labels Nov 17, 2022
@jsiek
Copy link
Author

jsiek commented Nov 17, 2022

This applies to version 2.6.2.
I'll give it a try with 2.6.3 and report back.

@jsiek
Copy link
Author

jsiek commented Nov 17, 2022

So I'll need to install that version... I tried the following but failed.
What's the recommended way to install the release candidate on a Mac?

jsiek@sice-mbp-986171 abstract-binding-trees % cabal update
Downloading the latest package list from hackage.haskell.org
Package list of hackage.haskell.org is up to date at index-state 2022-11-17T13:58:44Z
jsiek@sice-mbp-986171 abstract-binding-trees % cabal install Agda-2.6.2.2.20221106
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: Agda (user goal)
[__0] rejecting: Agda-2.6.2.2, Agda-2.6.2.1, Agda-2.6.2, Agda-2.6.1.3,
Agda-2.6.0.1, Agda-2.5.4.2, Agda-2.5.3, Agda-2.5.2, Agda-2.5.1.2,
Agda-2.4.2.5, Agda-2.4.2.4, Agda-2.4.2.3, Agda-2.4.2.2, Agda-2.4.2.1,
Agda-2.4.2, Agda-2.4.0.2, Agda-2.4.0.1, Agda-2.4.0, Agda-2.3.2.2,
Agda-2.3.2.1, Agda-2.3.2, Agda-2.3.0.1, Agda-2.3.0, Agda-2.2.10, Agda-2.2.8,
Agda-2.2.6, Agda-2.2.4, Agda-2.2.2, Agda-2.2.0, Agda-2.6.1.2, Agda-2.6.1.1,
Agda-2.6.1, Agda-2.6.0, Agda-2.5.4.1, Agda-2.5.4, Agda-2.5.1.1, Agda-2.5.1
(constraint from user target requires ==2.6.2.2.20221106)
[__0] fail (backjumping, conflict set: Agda)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: Agda

@fredrikNordvallForsberg
Copy link
Member

From the announcement of the release candidate on the mailing list:

# Installation

Agda 2.6.3 RC1 can be installed using cabal-install or stack:

* Getting the release candidate

    $ cabal get
https://hackage.haskell.org/package/Agda-2.6.2.2.20221106/candidate/Agda-2.6.2.2.20221106.tar.gz
    $ cd Agda-2.6.2.2.20221106

* Using cabal-install

    $ cabal install

* Using stack

    $ stack --stack-yaml stack-a.b.c.yaml install

replacing `a.b.c` with your version of GHC.

@jsiek
Copy link
Author

jsiek commented Nov 17, 2022

Thanks! (I'm not on the mailing list.)

@jsiek
Copy link
Author

jsiek commented Nov 17, 2022

With the release candidate, I'm getting a regular error from a different place in the code... it looks like the rewriting behavior has changed. I'll try to fix that other error...

@jsiek
Copy link
Author

jsiek commented Nov 17, 2022

How do I update my emacs agda-mode? I thought the cabal install for the agda release would also install a new agda-mode, but that doesn't seem to be the case.

@asr
Copy link
Member

asr commented Nov 18, 2022

Oops! Due to an involuntary errror, the agda-mode program wasn't include in the release candidate.

@jsiek
Copy link
Author

jsiek commented Nov 18, 2022

Ok, then I'll wait for a fixed release candidate.

@asr
Copy link
Member

asr commented Nov 18, 2022

I didn't get any error running Agda 2.6.3 RC1 on Lambda.agda:

$ cd src/rewriting/examples/
$ agda Lambda.agda

@jsiek
Copy link
Author

jsiek commented Nov 19, 2022

Good!

@andreasabel andreasabel added status: already-fixed and removed status: info-needed More information is needed from the bug reporter to confirm the issue. labels Nov 19, 2022
@andreasabel andreasabel added this to the 2.6.3 milestone Nov 19, 2022
@asr
Copy link
Member

asr commented Nov 19, 2022

Ok, then I'll wait for a fixed release candidate.

At the moment, you can use this temporal fix: In the file agda2-mode.el localized in the directory pointed by running agda-mode locate replace

(defvar agda2-version "2.6.2.2"

with

(defvar agda2-version "2.6.2.2.20221106"

@jsiek
Copy link
Author

jsiek commented Nov 19, 2022

Thanks! I can confirm that its working with 2.6.2.2.20221106.

@asr asr changed the title internal error in Agda, perhaps related to --rewriting internal error in Agda, perhaps related to --rewriting Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-error Concerning internal errors of Agda rewriting Rewrite rules, rewrite rule matching status: already-fixed
Projects
None yet
Development

No branches or pull requests

4 participants