From 313d5ef314a6ca9ac5f8f40b47c874d9f8feba2e Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Mon, 14 Mar 2022 12:05:28 -0700 Subject: [PATCH 1/4] Update to v0.15.0 (#66) * Update to CI to use 'unstable' purescript * Update pulp to 16.0.0-0 and psa to 0.8.2 * Update Bower dependencies to master * Added changelog entry --- .github/workflows/ci.yml | 2 ++ CHANGELOG.md | 1 + bower.json | 14 +++++++------- package.json | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43d2897..b6ebf3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - uses: purescript-contrib/setup-purescript@main + with: + purescript: "unstable" - uses: actions/setup-node@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index aab5e90..2496610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] Breaking changes: +- Update project and deps to PureScript v0.15.0 (#66 by @JordanMartinez) New features: diff --git a/bower.json b/bower.json index e92d057..cb214a4 100644 --- a/bower.json +++ b/bower.json @@ -16,14 +16,14 @@ "package.json" ], "dependencies": { - "purescript-control": "^5.0.0", - "purescript-invariant": "^5.0.0", - "purescript-maybe": "^5.0.0", - "purescript-prelude": "^5.0.0" + "purescript-control": "master", + "purescript-invariant": "master", + "purescript-maybe": "master", + "purescript-prelude": "master" }, "devDependencies": { - "purescript-assert": "^5.0.0", - "purescript-console": "^5.0.0", - "purescript-effect": "^3.0.0" + "purescript-assert": "master", + "purescript-console": "master", + "purescript-effect": "master" } } diff --git a/package.json b/package.json index d3602c1..c8e10e0 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "test": "pulp test" }, "devDependencies": { - "pulp": "^15.0.0", - "purescript-psa": "^0.8.0", + "pulp": "16.0.0-0", + "purescript-psa": "^0.8.2", "rimraf": "^3.0.2" } } From 5fbe43cb88e3784c8625c938cadcf61506edb3f4 Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Wed, 27 Apr 2022 14:09:57 -0500 Subject: [PATCH 2/4] Prepare v6.0.0 release (1st PS 0.15.0-compatible release) (#68) * Update the bower dependencies * Update Node to 14 in CI * Update the changelog --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 10 ++++++++++ bower.json | 14 +++++++------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6ebf3a..c69237a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: with: purescript: "unstable" - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: "12" + node-version: "14.x" - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 2496610..31709c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v6.0.0](https://github.com/purescript/purescript-either/releases/tag/v6.0.0) - 2022-04-27 + Breaking changes: - Update project and deps to PureScript v0.15.0 (#66 by @JordanMartinez) diff --git a/bower.json b/bower.json index cb214a4..6e9638d 100644 --- a/bower.json +++ b/bower.json @@ -16,14 +16,14 @@ "package.json" ], "dependencies": { - "purescript-control": "master", - "purescript-invariant": "master", - "purescript-maybe": "master", - "purescript-prelude": "master" + "purescript-control": "^6.0.0", + "purescript-invariant": "^6.0.0", + "purescript-maybe": "^6.0.0", + "purescript-prelude": "^6.0.0" }, "devDependencies": { - "purescript-assert": "master", - "purescript-console": "master", - "purescript-effect": "master" + "purescript-assert": "^6.0.0", + "purescript-console": "^6.0.0", + "purescript-effect": "^4.0.0" } } From b515c20806e85797adb1e28e81a81d4d46cd3c54 Mon Sep 17 00:00:00 2001 From: Mark Eibes Date: Fri, 13 May 2022 18:27:55 +0200 Subject: [PATCH 3/4] Add `blush` as an analogue to `hush` (#69) Also update docstring wording --- CHANGELOG.md | 4 +--- src/Data/Either.purs | 12 +++++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31709c2..f0b6254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based Breaking changes: New features: +- Add `blush` which is a left-biased `hush`, thus turns `Right`s into `Nothing`s but `Left`s into `Just`s (#69). Bugfixes: @@ -148,6 +149,3 @@ Add `Alt` instance ## [v0.1.0](https://github.com/purescript/purescript-either/releases/tag/v0.1.0) - 2014-04-21 - - - diff --git a/src/Data/Either.purs b/src/Data/Either.purs index 70c2bc5..3940d93 100644 --- a/src/Data/Either.purs +++ b/src/Data/Either.purs @@ -273,7 +273,7 @@ note a = maybe (Left a) Right note' :: forall a b. (Unit -> a) -> Maybe b -> Either a b note' f = maybe' (Left <<< f) Right --- | Turns an `Either` into a `Maybe`, by throwing eventual `Left` values away and converting +-- | Turns an `Either` into a `Maybe`, by throwing potential `Left` values away and converting -- | them into `Nothing`. `Right` values get turned into `Just`s. -- | -- | ```purescript @@ -282,3 +282,13 @@ note' f = maybe' (Left <<< f) Right -- | ``` hush :: forall a b. Either a b -> Maybe b hush = either (const Nothing) Just + +-- | Turns an `Either` into a `Maybe`, by throwing potential `Right` values away and converting +-- | them into `Nothing`. `Left` values get turned into `Just`s. +-- | +-- | ```purescript +-- | blush (Left "ParseError") = Just "Parse Error" +-- | blush (Right 42) = Nothing +-- | ``` +blush :: forall a b. Either a b -> Maybe a +blush = either Just (const Nothing) From af655a04ed2fd694b6688af39ee20d7907ad0763 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Mon, 16 May 2022 21:16:21 -0500 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0b6254..73022e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,16 @@ Notable changes to this project are documented in this file. The format is based Breaking changes: New features: -- Add `blush` which is a left-biased `hush`, thus turns `Right`s into `Nothing`s but `Left`s into `Just`s (#69). Bugfixes: Other improvements: +## [v6.1.0](https://github.com/purescript/purescript-either/releases/tag/v6.1.0) - 2022-05-16 + +New features: +- Add `blush` which is a left-biased `hush`, thus turns `Right`s into `Nothing`s but `Left`s into `Just`s (#69 by @i-am-the-slime). + ## [v6.0.0](https://github.com/purescript/purescript-either/releases/tag/v6.0.0) - 2022-04-27 Breaking changes: