lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

chore: add warning comments about `findM?`

Open kim-em opened this issue 1 year ago • 5 comments

kim-em avatar May 10 '24 06:05 kim-em

Pinging @arthur-adjedj, just FYI.

kim-em avatar May 10 '24 06:05 kim-em

Thank you for the ping, I didn't take that into consideration when writing that function. occursOrInType could be rewritten with the non-monadic find by passing the LocalContext to the function and fetching the type of fvars there. Doing so might be the better option compared to keeping findM in the codebase.

arthur-adjedj avatar May 10 '24 07:05 arthur-adjedj

Thank you for the ping, I didn't take that into consideration when writing that function. FYI, occursOrInType could be rewritten with the non-monadic find by passing the LocalContext to the function and fetching the type of fvars there. Doing so might be the better option compared to keeping findM in the codebase.

If you'd be interested in doing that, I'd love to merge it. :-) findM? seems like a scary footgun to leave around.

kim-em avatar May 10 '24 07:05 kim-em

Right. I'm not available to work on this now, but will make an according PR to fix occursOrInType and to remove the monadic find by the end of the day.

arthur-adjedj avatar May 10 '24 07:05 arthur-adjedj

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase ca6437df717b550cbea3e110f3093c1250d5c5be --onto fe7b96d8a0cf85e1ea81791ac9d673f84c9e866d. (2024-05-10 07:09:17)

Obsolete given #4125.

kim-em avatar May 12 '24 23:05 kim-em