Closed oskeri closed 1 month ago
The error is thrown in this function: https://github.com/agda/agda/blob/691b30a54350d047b6efd9b6d4bf61279c4761ec/src/full/Agda/Interaction/MakeCase.hs#L209-L222
It turns out that getConstInfo
returns an AbstractDef Function{..}
here, so, somehow the opacity logic does not allow unfolding of the extended lambda.
A quick fix would be to just strip the AbstractDef
wrapper here, but I guess we should understand why it is returned like this and fix the underlying problem.
Having (finally! my apologies) looked at it, the issue is that the extended lambda is added to the "declares" set of the unfolding block, but not the unfolds set. That's because we only update the unfolds set at the end of scope-checking the top-level module. Fix coming up..
For the code below, the following sequence of commands produces an internal error on version 2.6.4 and on
master
:λ { x → {! x !} }
x
The error is
Reloading between refining and case-splitting does not give an error.