Skip to content

Commit

Permalink
ScopedSnocList: Recalculate argpos in case unelaboration
Browse files Browse the repository at this point in the history
  • Loading branch information
spcfox authored and GulinSS committed Feb 21, 2025
1 parent 4a136f2 commit 1c7145f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TTImp/Unelab.idr
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ mutual
| _ => pure Nothing
let Just argpos = findArgPos treect
| _ => pure Nothing
if length args == length pargs
then mkCase pats argpos args
let len = length args
if len == length pargs
then mkCase pats (len `minus` argpos + 1) args
else pure Nothing
where
-- Need to find the position of the scrutinee to rebuild original
Expand Down

0 comments on commit 1c7145f

Please sign in to comment.