Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,8 +33,17 @@ 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

- 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
16 changes: 8 additions & 8 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
, "maybe"
, "newtype"
, "prelude"
, "psci-support"
, "quickcheck"
, "quickcheck-laws"
, "tailrec"
Expand Down
4 changes: 2 additions & 2 deletions src/Test/QuickCheck/Laws/Control/Align.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-- |
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/Test/QuickCheck/Laws/Control/Alignable.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-- |
Expand All @@ -21,7 +21,7 @@ checkAlignable
=> Arbitrary (f A)
=> Arbitrary (f B)
=> Eq (f (These A B))
=> Proxy2 f
=> Proxy f
-> Effect Unit
checkAlignable _ = do

Expand Down
6 changes: 3 additions & 3 deletions src/Test/QuickCheck/Laws/Control/Crosswalk.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-- |
Expand All @@ -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

Expand Down
28 changes: 14 additions & 14 deletions test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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"