Closed m0rphism closed 2 months ago
Ouch! The internal error is here: https://github.com/agda/agda/blob/403ee4263e0f14222956e398d2610ae1a4f05467/src/full/Agda/Syntax/Abstract/Name.hs#L149-L154 However, the cause is probably in our dreaded imports logic.
Agda 2.6.1 still says:
The file /Users/abel/play/agda/bugs/Issue7208/A.agda can be
accessed via several project roots. Both A and Issue7208.A point to
this file.
when scope checking the declaration
import Issue7208.A
Bisection says: 6c29efdc8c0eb1d1fbaf2d2ef5a5eefb704a9525 is the first bad commit @rwe Date: Tue Nov 24 15:26:01 2020 -0800
imports/refact: Move ifile module name validation into getStoredInterface
Interfaces made with `createInterface` will already have been checked by
the scope checker, and cached interfaces will already have been either
there or here.
src/full/Agda/Interaction/Imports.hs | 14 +++++++-------
This commit does not cleanly revert, so one has to understand what is going on to restore the proper error. But blaming this commit might help understanding.
Here is a minimal example:
Create the file
A/B.agda
and leave it empty.Create the file
A/C.agda
with the following content:Typechecking
A/C.agda
produces the following internal error:Expected behavior: Agda should inform me that
A/B.agda
exists, but that its module name defaults toB
, whereas it should beA.B
.Agda Versions: Bug occurs with both Agda 2.6.4.3 and the current master (commit 403ee4263).