Projection-likeness and instance arguments #6203
Labels
projection-like
projections
Issues relating to the treatment of projections
type: bug
Issues and pull requests about actual bugs
ux: interaction
Issues to do with interactive development (holes, case splitting, etc)
Milestone
The following reproducer was minimized from a macro that generates a big expression containing
hlevel 2
; We'd like to use this macro with elaborate-and-give, since it fills out a definition skeleton and allows the user to fill in any gaps by themselves.Try doing elaborate-and-give for
hlevel 2
. What you get ishlevel _
: thehlevel
function is projection-like for thex
argument, so Agda erases the2
, since it's reconstructible fromx
. But it's not reconstructible after printing: if you write justp = hlevel _
, or reload after doing elaborate-and-give on the interaction point, Agda does not solve the instance constraint.I'm not too familiar with the projection-likeness analysis, but I'm suspicious of whether an instance argument whose type depends on a visible argument in the same telescope should be considered "principal". Because of that unfamiliarity, the fix I implemented doesn't change the analysis: I reconstruct arguments in
elaborate_and_give
and I added aNOT_PROJECTION_LIKE
pragma.The text was updated successfully, but these errors were encountered: