-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upstream ListM from mathlib4 #165
Conversation
Can be merged as-is (mathlib down-port). Just a nitpick: shouldn't it be |
the naming convention from core is |
Sounds a lot better to me! @semorrison ? |
@semorrison I made a bunch of modifications here. Most notably, some of the function arguments have gained a |
Since @digama0 has baked-in laziness, maybe we should consider renaming this One reason is that the specialization to Another reason is that I would expect In my mind, PS: Why this was called |
The reason for baking in the laziness is because you can end up with a completely different order of operations when using do notation than what you would expect, when the monad is something "strict" like |
I see. The |
Sorry, I haven't looked at this in a while. I am slightly in favour of However the much bigger chore that remains is to building mathlib against Mario's changes and see if everything still works. I will try to make this a priority. |
Downstream I used EDIT: looking at the code, I actually never need it! Nice. :-) |
Remaining tasks here:
|
I'm basically happy with the current state of things. @semorrison, what do you think about the name |
`ListM` has been [moved to `Std`](leanprover-community/batteries#165) and renamed as `MLList`. There are some slight API functions, that ensure operations are lazy, requiring the addition of some `fun _ =>` here in Mathlib. Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Bulhwi Cha <chabulhwi@semmalgil.com>
`ListM` has been [moved to `Std`](leanprover-community/batteries#165) and renamed as `MLList`. There are some slight API functions, that ensure operations are lazy, requiring the addition of some `fun _ =>` here in Mathlib. Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Bulhwi Cha <chabulhwi@semmalgil.com>
This migrates
ListM
upstream from Mathlib, renaming it toMLList
(for "monadic lazy list", returning to the mathlib3 name), and making some adjustments so more operations are lazy.