Skip to content
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

removed redundant use of with #1947

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Conversation

jamesmckinna
Copy link
Contributor

@jamesmckinna jamesmckinna commented Apr 20, 2023

cf. issue #1937

UPDATED: these are several of the more egregious 'gratuitous' uses of with in stdlib. I haven't (and won't, on this iteration) attempted to be systematic in replacing use of with on a Boolean argument in favour of if_then_else_, nor those where they are used essentially as let-bindings, but now I have where (at the bare minimum) an irrefutable pattern with a variable would be more (cognitively) efficient.

The one 'noteworthy' instance here concerns scanr, where a reordering of the (nested) with patterns permitted elimination of the dead branch completely in favour of an irrefutable _∷_ pattern.

No CHANGELOG: only the proofs of existing lemmas have been modified.

@MatthewDaggitt MatthewDaggitt added this to the v2.0 milestone Apr 22, 2023
Copy link
Contributor

@MatthewDaggitt MatthewDaggitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise no complaints from me!

@jamesmckinna jamesmckinna deleted the selective branch April 23, 2023 17:58
@jamesmckinna jamesmckinna restored the selective branch April 23, 2023 17:59
@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Apr 23, 2023

Oh! I renamed the branch (source of my original confusion re #1948/#1919) and GH closed the PR... FIXED now!

@jamesmckinna jamesmckinna reopened this Apr 23, 2023
@MatthewDaggitt MatthewDaggitt merged commit 2839cec into agda:master Apr 24, 2023
@jamesmckinna jamesmckinna deleted the selective branch April 24, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants