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

Replace/quarantine uses of head and NE.fromList functions #1503

Merged
merged 11 commits into from
Sep 10, 2023

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Sep 10, 2023

Towards #1494

  • Totally eliminates partial head
  • introduces an hlint rule to ban unsafe use of head
  • restricts use of the partial fromList from NonEmpty

@kostmo kostmo force-pushed the refactor/replace-partial-functions branch from d8dec5c to 6aecaee Compare September 10, 2023 01:49
@kostmo kostmo marked this pull request as ready for review September 10, 2023 01:49
@kostmo kostmo requested a review from byorgey September 10, 2023 01:49
@kostmo kostmo added Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality. Z-Developer Experience This issue seeks to make life easier for developers writing Scenarios or other Swarm code. labels Sep 10, 2023
@kostmo kostmo changed the title Replace all uses of 'head' function Replace/quarrantine uses of 'head' and NE.fromList functions Sep 10, 2023
@kostmo kostmo changed the title Replace/quarrantine uses of 'head' and NE.fromList functions Replace/quarrantine uses of head and NE.fromList functions Sep 10, 2023
@byorgey byorgey changed the title Replace/quarrantine uses of head and NE.fromList functions Replace/quarantine uses of head and NE.fromList functions Sep 10, 2023
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

This is great!

src/Swarm/Doc/Gen.hs Outdated Show resolved Hide resolved
src/Swarm/Game/Scenario/Topography/Cell.hs Outdated Show resolved Hide resolved
src/Swarm/Util/Parse.hs Outdated Show resolved Hide resolved
@kostmo kostmo force-pushed the refactor/replace-partial-functions branch from 281f404 to 3ad91d9 Compare September 10, 2023 05:55
@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Sep 10, 2023
@mergify mergify bot merged commit 0c311b4 into main Sep 10, 2023
9 checks passed
@mergify mergify bot deleted the refactor/replace-partial-functions branch September 10, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request. Z-Developer Experience This issue seeks to make life easier for developers writing Scenarios or other Swarm code. Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants