From f8a720490d5f7fc352d3ca90a14164528f3b9c05 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 1/8] Update to CI to use 'unstable' purescript --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef2046b..9647641 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - name: Set up a PureScript toolchain uses: purescript-contrib/setup-purescript@main with: + purescript: "unstable" purs-tidy: "latest" - name: Cache PureScript dependencies From afade6d3514d7542a4a3c1751be98e5bd35c8633 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 2/8] Add CI test: verify 'bower.json' file works via pulp --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9647641..f87bf6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,3 +38,12 @@ jobs: - name: Check formatting run: purs-tidy check src test + + - name: Verify Bower & Pulp + run: | + npm install bower pulp@16.0.0-0 + npx bower install + npx pulp build -- --censor-lib --strict + if [ -d "test" ]; then + npx pulp test + fi From 04963026410fe3899a73e38373b7c5b07001f2df Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 3/8] Ignore spago-based tests (temporarily) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f87bf6b..ded9795 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,8 @@ jobs: - name: Build source run: spago build --no-install --purs-args '--censor-lib --strict' - - name: Run tests - run: spago test --no-install +# - name: Run tests +# run: spago test --no-install - name: Check formatting run: purs-tidy check src test From a8dc342cf5fad7714e100440e6a26e01f1800280 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 4/8] Update Bower dependencies to master or main --- bower.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index f3962f3..448383a 100644 --- a/bower.json +++ b/bower.json @@ -17,15 +17,15 @@ "package.json" ], "dependencies": { - "purescript-arrays": "^6.0.0", - "purescript-gen": "^3.0.0", - "purescript-lists": "^6.0.0", - "purescript-quickcheck": "^7.0.0", - "purescript-quickcheck-laws": "^6.0.0", - "purescript-tuples": "^6.0.0" + "purescript-arrays": "master", + "purescript-gen": "master", + "purescript-lists": "master", + "purescript-quickcheck": "master", + "purescript-quickcheck-laws": "main", + "purescript-tuples": "master" }, "devDependencies": { - "purescript-console": "^5.0.0", - "purescript-effect": "^3.0.0" + "purescript-console": "master", + "purescript-effect": "master" } } From d27c3f48da2ee073b0862aedf6322607cb331b7d Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 5/8] Update packages.dhall to 'prepare-0.15' package set --- packages.dhall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.dhall b/packages.dhall index 7a6905b..582d6d3 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,4 +1,4 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c + https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall in upstream From 3677e74508f946ff35d6898460cd90cbf08d2073 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:22:48 -0500 Subject: [PATCH 6/8] Removed unneeded 'psci-support' package --- spago.dhall | 1 - 1 file changed, 1 deletion(-) diff --git a/spago.dhall b/spago.dhall index 64d147e..3bcd4b6 100644 --- a/spago.dhall +++ b/spago.dhall @@ -12,7 +12,6 @@ , "maybe" , "newtype" , "prelude" - , "psci-support" , "quickcheck" , "quickcheck-laws" , "tailrec" From f164814ca2a16d2e265f9c63115c6c23c9b0a12c Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 12:28:47 -0500 Subject: [PATCH 7/8] Replace Proxy2 with Proxy --- src/Test/QuickCheck/Laws/Control/Align.purs | 4 +-- .../QuickCheck/Laws/Control/Alignable.purs | 4 +-- .../QuickCheck/Laws/Control/Crosswalk.purs | 6 ++-- test/Main.purs | 28 +++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Test/QuickCheck/Laws/Control/Align.purs b/src/Test/QuickCheck/Laws/Control/Align.purs index d087101..9a84b89 100644 --- a/src/Test/QuickCheck/Laws/Control/Align.purs +++ b/src/Test/QuickCheck/Laws/Control/Align.purs @@ -10,7 +10,7 @@ import Effect.Console (log) import Test.QuickCheck (quickCheck') import Test.QuickCheck.Arbitrary (class Arbitrary) import Test.QuickCheck.Laws (A, B, C, D) -import Type.Proxy (Proxy2) +import Type.Proxy (Proxy) -- | Instances are required to satisfy the following laws: -- | @@ -28,7 +28,7 @@ checkAlign => Eq (f (These A B)) => Eq (f (These C D)) => Eq (f (These A (These B C))) - => Proxy2 f + => Proxy f -> Effect Unit checkAlign _ = do diff --git a/src/Test/QuickCheck/Laws/Control/Alignable.purs b/src/Test/QuickCheck/Laws/Control/Alignable.purs index b1242ad..88a535b 100644 --- a/src/Test/QuickCheck/Laws/Control/Alignable.purs +++ b/src/Test/QuickCheck/Laws/Control/Alignable.purs @@ -9,7 +9,7 @@ import Effect.Console (log) import Test.QuickCheck (quickCheck') import Test.QuickCheck.Arbitrary (class Arbitrary) import Test.QuickCheck.Laws (A, B) -import Type.Proxy (Proxy2) +import Type.Proxy (Proxy) -- | Instances are required to satisfy the following laws: -- | @@ -21,7 +21,7 @@ checkAlignable => Arbitrary (f A) => Arbitrary (f B) => Eq (f (These A B)) - => Proxy2 f + => Proxy f -> Effect Unit checkAlignable _ = do diff --git a/src/Test/QuickCheck/Laws/Control/Crosswalk.purs b/src/Test/QuickCheck/Laws/Control/Crosswalk.purs index c4462d9..9df7763 100644 --- a/src/Test/QuickCheck/Laws/Control/Crosswalk.purs +++ b/src/Test/QuickCheck/Laws/Control/Crosswalk.purs @@ -8,7 +8,7 @@ import Effect.Console (log) import Test.QuickCheck (quickCheck') import Test.QuickCheck.Arbitrary (class Arbitrary) import Test.QuickCheck.Laws (A) -import Type.Proxy (Proxy2) +import Type.Proxy (Proxy) -- | Instances are required to satisfy the following laws: -- | @@ -19,8 +19,8 @@ checkCrosswalk => Alignable t => Arbitrary (f A) => Eq (t (f A)) - => Proxy2 f - -> Proxy2 t + => Proxy f + -> Proxy t -> Effect Unit checkCrosswalk _ _ = do diff --git a/test/Main.purs b/test/Main.purs index 2fcc59b..649c825 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -12,40 +12,40 @@ import Test.QuickCheck.Laws (A) import Test.QuickCheck.Laws.Control.Align (checkAlign) import Test.QuickCheck.Laws.Control.Alignable (checkAlignable) import Test.QuickCheck.Laws.Control.Crosswalk (checkCrosswalk) -import Type.Proxy (Proxy2(..)) +import Type.Proxy (Proxy(..)) runCrosswalkChecksFor :: forall f . Crosswalk f => Arbitrary (f A) => Eq (f A) - => Proxy2 f + => Proxy f -> String -> Effect Unit runCrosswalkChecksFor p name = do log $ "Check Crosswalk instance for " <> name <> "/Array" - checkCrosswalk p (Proxy2 :: _ Array) + checkCrosswalk p (Proxy :: _ Array) log $ "Check Crosswalk instance for " <> name <> "/Maybe" - checkCrosswalk p (Proxy2 :: _ Maybe) + checkCrosswalk p (Proxy :: _ Maybe) log $ "Check Crosswalk instance for " <> name <> "/List" - checkCrosswalk p (Proxy2 :: _ List) + checkCrosswalk p (Proxy :: _ List) main :: Effect Unit main = do log "Checking Align instance for Array" - checkAlign (Proxy2 :: _ Array) + checkAlign (Proxy :: _ Array) log "Checking Align instance for List" - checkAlign (Proxy2 :: _ List) + checkAlign (Proxy :: _ List) log "Checking Align instance for Maybe" - checkAlign (Proxy2 :: _ Maybe) + checkAlign (Proxy :: _ Maybe) log "Check Alignable instance for Array" - checkAlignable (Proxy2 :: _ Array) + checkAlignable (Proxy :: _ Array) log "Checking Alignable instance for List" - checkAlignable (Proxy2 :: _ List) + checkAlignable (Proxy :: _ List) log "Checking Alignable instance for Maybe" - checkAlignable (Proxy2 :: _ Maybe) + checkAlignable (Proxy :: _ Maybe) - runCrosswalkChecksFor (Proxy2 :: _ Array) "Array" - runCrosswalkChecksFor (Proxy2 :: _ Maybe) "Maybe" - runCrosswalkChecksFor (Proxy2 :: _ List) "List" + runCrosswalkChecksFor (Proxy :: _ Array) "Array" + runCrosswalkChecksFor (Proxy :: _ Maybe) "Maybe" + runCrosswalkChecksFor (Proxy :: _ List) "List" From 467036bbb4a35c2a6b0544f8884dc95bc20124f8 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 12:29:31 -0500 Subject: [PATCH 8/8] Added changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9aa096..3addba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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 (#41 by @JordanMartinez) +- Replaced polymorphic proxies with monomorphic `Proxy` (#41 by @JordanMartinez) New features: