Closed samhh closed 1 year ago
A limitation of the approach described at the end of #48, potentially implemented with Cofree
, is that we can only store source information where the pattern functor recurses.
Consider a lint against SelectNamedF
where we want to match on a branch. We'll have the offset of the branches, because we recurse there, but not on the branch names themselves, which is often what we'll want to point to. In this specific example we should be able to calculate an accurate offset (roughly head node - length branchName - 1
), but that mightn't solve the problem universally. It's a bit inelegant.
More like the parser errors.
This'll probably be a large task.