-
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate runOnWorkspaces in favour of traverseWorkspaces
`runOnWorkspaces` was a questionable existence in various ways: * It traversed the workspaces in a unexpected, nonstandard order. * It needlessly utilised a non-exhaustive pattern match, abusing first `MonadFail` then irrefutability to evade warning. * It was used nowhere in contrib, once in core---that sole use with a pure function. * Even after generalisation, it still has a bad type, both misleading and lacking in parametricity. Specialising the `StackSet` traversal to the `WindowSet` in `XState` gives the function too much power, and suggests that it's using that power to provide special support for `WindowSet` modifications when in fact it does no such thing. To resolve these issues, the workspace traversal logic is written as `traverseWorkspaces` in `X.StackSet`, and `mapWorkspaces` written atop that via `Identity`. The latter then replaces the sole use of `runOnWorkspaces`, condemning it to deprecation.
- Loading branch information
Showing
4 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters