Skip to content

Commit 0acdb46

Browse files
Update to PureScript v0.15.0 (#59)
* Add CI test: verify 'bower.json' file works via pulp * Ignore spago-based tests (temporarily) * Update Bower dependencies to master or main * Update packages.dhall to 'prepare-0.15' package set * Drop MonadZero instances and law check * Replace Proxy2/Proxy3 with Proxy * Added changelog entry * Add monadzero entry to changelog * Add Proxy2/Proxy3 change to changelog * Fix import warning * Update CI to use unstable purescript
1 parent 685f413 commit 0acdb46

27 files changed

+67
-98
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414

1515
- name: Set up a PureScript toolchain
1616
uses: purescript-contrib/setup-purescript@main
17+
with:
18+
purescript: "unstable"
1719

1820
- name: Cache PureScript dependencies
1921
uses: actions/cache@v2
@@ -29,5 +31,14 @@ jobs:
2931
- name: Build source
3032
run: spago build --no-install --purs-args '--censor-lib --strict'
3133

32-
- name: Run tests
33-
run: spago test --no-install
34+
# - name: Run tests
35+
# run: spago test --no-install
36+
37+
- name: Verify Bower & Pulp
38+
run: |
39+
npm install bower [email protected]
40+
npx bower install
41+
npx pulp build -- --censor-lib --strict
42+
if [ -d "test" ]; then
43+
npx pulp test
44+
fi

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
- Update project and deps to PureScript v0.15.0 (#59 by @JordanMartinez)
9+
- Drop deprecated `MonadZero` instance (#59 by @JordanMartinez)
10+
- Drop `Proxy2`/`Proxy3` usage in favor of just `Proxy` (#59 by @JordanMartinez)
811

912
New features:
1013
- Provide `Arbitrary`-less law checks (#36 by @matthewleon, #57 by @JordanMartinez)

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"package.json"
2121
],
2222
"dependencies": {
23-
"purescript-prelude": "^5.0.0",
24-
"purescript-enums": "^5.0.0",
25-
"purescript-quickcheck": "^7.0.0"
23+
"purescript-prelude": "master",
24+
"purescript-enums": "master",
25+
"purescript-quickcheck": "master"
2626
}
2727
}

packages.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
let upstream =
2-
https://github.com/purescript/package-sets/releases/download/psc-0.14.0/packages.dhall sha256:710b53c085a18aa1263474659daa0ae15b7a4f453158c4f60ab448a6b3ed494e
2+
https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall
33

44
in upstream

src/Test/QuickCheck/Laws/Control.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ import Test.QuickCheck.Laws.Control.Comonad (checkComonad, checkComonadGen) as E
1010
import Test.QuickCheck.Laws.Control.Extend (checkExtend, checkExtendGen) as Exports
1111
import Test.QuickCheck.Laws.Control.Monad (checkMonad, checkMonadGen) as Exports
1212
import Test.QuickCheck.Laws.Control.MonadPlus (checkMonadPlus, checkMonadPlusGen) as Exports
13-
import Test.QuickCheck.Laws.Control.MonadZero (checkMonadZero, checkMonadZeroGen) as Exports
1413
import Test.QuickCheck.Laws.Control.Plus (checkPlus, checkPlusGen) as Exports
1514
import Test.QuickCheck.Laws.Control.Semigroupoid (checkSemigroupoid, checkSemigroupoidGen) as Exports

src/Test/QuickCheck/Laws/Control/Alt.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Test.QuickCheck (quickCheck')
1010
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
1111
import Test.QuickCheck.Gen (Gen)
1212
import Test.QuickCheck.Laws (A, B)
13-
import Type.Proxy (Proxy2)
13+
import Type.Proxy (Proxy)
1414

1515
-- | - Associativity: `(x <|> y) <|> z == x <|> (y <|> z)`
1616
-- | - Distributivity: `f <$> (x <|> y) == (f <$> x) <|> (f <$> y)`
@@ -20,7 +20,7 @@ checkAlt
2020
Arbitrary (f A)
2121
Eq (f A)
2222
Eq (f B)
23-
Proxy2 f
23+
Proxy f
2424
Effect Unit
2525
checkAlt _ = checkAltGen (arbitrary :: Gen (f A))
2626

src/Test/QuickCheck/Laws/Control/Alternative.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Test.QuickCheck (quickCheck')
1212
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
1313
import Test.QuickCheck.Gen (Gen)
1414
import Test.QuickCheck.Laws (A, B)
15-
import Type.Proxy (Proxy2)
15+
import Type.Proxy (Proxy)
1616

1717
-- | - Distributivity: `(f <|> g) <*> x == (f <*> x) <|> (g <*> x)`
1818
-- | - Annihilation: `empty <*> x = empty`
@@ -23,7 +23,7 @@ checkAlternative
2323
Arbitrary (f A)
2424
Eq (f A)
2525
Eq (f B)
26-
Proxy2 f
26+
Proxy f
2727
Effect Unit
2828
checkAlternative =
2929
checkAlternativeGen (arbitrary :: Gen (f A)) (arbitrary :: Gen (f (A B)))
@@ -35,7 +35,7 @@ checkAlternativeGen
3535
Eq (f B)
3636
Gen (f A)
3737
Gen (f (A B))
38-
Proxy2 f
38+
Proxy f
3939
Effect Unit
4040
checkAlternativeGen gen genf _ = do
4141
log "Checking 'Left identity' law for Alternative"

src/Test/QuickCheck/Laws/Control/Applicative.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Test.QuickCheck (quickCheck')
1010
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
1111
import Test.QuickCheck.Gen (Gen)
1212
import Test.QuickCheck.Laws (A, B, C)
13-
import Type.Proxy (Proxy2)
13+
import Type.Proxy (Proxy)
1414

1515
-- | - Identity: `(pure identity) <*> v = v`
1616
-- | - Composition: `(pure (<<<)) <*> f <*> g <*> h = f <*> (g <*> h)`
@@ -25,7 +25,7 @@ checkApplicative
2525
Eq (f A)
2626
Eq (f B)
2727
Eq (f C)
28-
Proxy2 f
28+
Proxy f
2929
Effect Unit
3030
checkApplicative _ =
3131
checkApplicativeGen

src/Test/QuickCheck/Laws/Control/Apply.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Test.QuickCheck (quickCheck')
99
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
1010
import Test.QuickCheck.Gen (Gen)
1111
import Test.QuickCheck.Laws (A, B, C)
12-
import Type.Proxy (Proxy2)
12+
import Type.Proxy (Proxy)
1313

1414
-- | - Associative composition: `(<<<) <$> f <*> g <*> h = f <*> (g <*> h)`
1515
checkApply
@@ -19,7 +19,7 @@ checkApply
1919
Arbitrary (f (A B))
2020
Arbitrary (f (B C))
2121
Eq (f C)
22-
Proxy2 f
22+
Proxy f
2323
Effect Unit
2424
checkApply _ =
2525
checkApplyGen

src/Test/QuickCheck/Laws/Control/Bind.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import Test.QuickCheck (quickCheck')
99
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
1010
import Test.QuickCheck.Gen (Gen)
1111
import Test.QuickCheck.Laws (A)
12-
import Type.Proxy (Proxy2)
12+
import Type.Proxy (Proxy)
1313

1414
-- | - Associativity: `(x >>= f) >>= g = x >>= (\k → f k >>= g)`
1515
checkBind
1616
m
1717
. Bind m
1818
Arbitrary (m A)
1919
Eq (m A)
20-
Proxy2 m
20+
Proxy m
2121
Effect Unit
2222
checkBind _ = checkBindGen (arbitrary :: Gen (m A)) (arbitrary :: Gen (A m A))
2323

0 commit comments

Comments
 (0)