-
Notifications
You must be signed in to change notification settings - Fork 339
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 typechecking non-terminating function on case-insensitive filesystem #5508
Comments
Strange, I can't reproduce this in either 2.6.1.3 or 2.6.2
I can't find this Agda commit in the git history. 🤨 Edit: I have just compiled & installed HEAD and I'm not able to reproduce the internal error either. |
Is there additional info I could share that would be useful? I updated to Homebrew's HEAD version of Agda and it still reproes for me:
|
I cannot reproduce this with any of 2.6.1, 2.6.2, or 2.6.3 (dev version). |
Actually, looking at the error location, this could be a problem with case-insensitive/ignoring file systems (wild guess). agda/src/full/Agda/TypeChecking/Errors.hs Line 296 in 8aec1e6
Is the filename exactly Universesbug.agda or is it a case-variant of it?
|
The file name is
New shrunk repro is any non-termination error in a module where the case of the module name does not match the case in the invocation of agda.
module Casebug where
nt : ∀ {A : Set} → A → A
nt i = nt i
...and... module casebug where
nt : ∀ {A : Set} → A → A
nt i = nt i
|
I can reproduce this on a FAT32-formatted USB stick, when I call UPDATE (5 hrs later): Actually, this bug also exists on macOS, I could have saved myself many hours trying to get a dev env on Windows running... |
The ( TopLevelModuleName
{ moduleNameRange = Range (Just (AbsolutePath {textPath = "/Volumes/FAT32/iSSue5508.agda"})) (...)
, moduleNameParts = "Issue5508" :| []
}
, AbsolutePath {textPath = "/Volumes/FAT32/Issue5508.agda"}
) |
Fixed by proactively putting the correct entry into the |
The test fails in the --- "a/C:\\Users\\runneradmin\\AppData\\Local\\Temp\\iSS3936.golden"
+++ "b/C:\\Users\\runneradmin\\AppData\\Local\\Temp\\iSS3947.actual"
@@ -1,9 +1,7 @@
-customised/iSSue5508.agda:10,1-11,6
-Termination checking failed for the following functions:
- A
-Problematic calls:
- A (at customised/iSSue5508.agda:11,5-6)
-customised/iSSue5508.agda:29,6-8
-Cannot eliminate type R with projection S.g
-when checking the clause left hand side
-test .g
+customised/iSSue5508.agda:6,8-17
+The name of the top level module does not match the file name. The
+module Issue5508 should be defined in one of the following files:
+ customised/Issue5508.agda
+ customised/Issue5508.lagda
+ agda-default-include-path/Issue5508.agda
+ agda-default-include-path/Issue5508.lagda The golden value is the one for a case-insensitive file system, but Agda produces the error for a case-sensitive file system. The module name is
but Agda is called with file name iSSue5508.agda . The error isn't surprising even for a case-insensitive FS, the question is more why it is not triggered on macOS, but only on Windows.
UPDATE: Ah, the explanation is that Agda does something OS-specific for Windows rather than doing something filesystem-specific. Hence the difference to macOS: agda/src/full/Agda/Utils/FileName.hs Lines 106 to 114 in 070d0c8
This twist was added by Makoto (we miss you in the team!) in e46f6bf. |
Try to entirely leave it to the filesystem whether a module name matches a file name; do not enforce same capitalization.
Try to entirely leave it to the filesystem whether a module name matches a file name; do not enforce same capitalization.
Try to entirely leave it to the filesystem whether a module name matches a file name; do not enforce same capitalization.
Cherry-picked onto |
(Had to reopen the issue just to link it to #5510.) |
Working through the tutorial at http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf , I wanted to see the error given by 'fold'. Here is the somewhat-minimized code:
An internal error has occurred. Please report this as a bug. Location of the error: __IMPOSSIBLE__, called at src/full/Agda/TypeChecking/Errors.hs:296:\ 18 in Agd-2.6.2-d8dfa68e:Agda.TypeChecking.Errors
Agda installed from Homebrew:
The text was updated successfully, but these errors were encountered: