Remove mapPartial from mllist
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
It seems that mllist redefines mapPartial which already exists in list:
```
listTheory.mapPartial_def;
val it =
⊢ (∀f. mapPartial f [] = []) ∧
∀f x xs.
mapPartial f (x::xs) =
case f x of NONE => mapPartial f xs | SOME y => y::mapPartial f xs:
thm
> mllistTheory.mapPartial_def;
val it =
⊢ (∀f. mapPartial f [] = []) ∧
∀f h t.
mapPartial f (h::t) =
case f h of NONE => mapPartial f t | SOME x => x::mapPartial f t: thm
```
I ran into this issue after spending some time not understanding why `mapPartial_def` is not doing anything as I had an `mllist` as my ancestors.
I suspect the fix is basically as simple as just deleting the definition, with perhaps minor changes required here and there.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the mllist and list theories and compare their mapPartial_def definitions; search for references to mllistTheory.mapPartial_def before changing the duplicate. Done means mllist uses the existing list definition without breaking affected HOL theory builds.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100