better fc in missing case

This commit is contained in:
2025-01-11 17:40:24 -08:00
parent 363f85710f
commit 1a9a8d3312

View File

@@ -1361,7 +1361,7 @@ check ctx tm ty = do
pure $ MkClause (getFC pat) ((scnm, pat') :: Nil) Nil rawRHS pure $ MkClause (getFC pat) ((scnm, pat') :: Nil) Nil rawRHS
-- buildCase expects scrutinee to be a name in the context, so we need to let it. -- buildCase expects scrutinee to be a name in the context, so we need to let it.
-- if it's a Bnd and not shadowed we could skip the let, but that's messy. -- if it's a Bnd and not shadowed we could skip the let, but that's messy.
let ctx' = extend ctx scnm scty let ctx' = withPos (extend ctx scnm scty) (getFC tm)
tree <- buildTree ctx' $ MkProb clauses ty tree <- buildTree ctx' $ MkProb clauses ty
pure $ Let fc scnm sc tree pure $ Let fc scnm sc tree