From 162d74f767c318d9d1d71dc30037c6c950113132 Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Tue, 22 Mar 2022 11:34:29 -0500 Subject: [PATCH] Update to PureScript v0.15.0 (#26) * Update to CI to use 'unstable' purescript * 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 * Removed unneeded 'psci-support' package * Replace depr. unfoldCofree with buildCofree * Add changelog entry --- .github/workflows/ci.yml | 14 ++++++++++++-- CHANGELOG.md | 1 + bower.json | 14 +++++++------- packages.dhall | 2 +- spago.dhall | 1 - src/Matryoshka/DistributiveLaw.purs | 4 ++-- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef2046b..ded9795 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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d3326..17c47ff 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 (#26 by @JordanMartinez) New features: diff --git a/bower.json b/bower.json index 425f819..1d23540 100644 --- a/bower.json +++ b/bower.json @@ -15,14 +15,14 @@ "package.json" ], "dependencies": { - "purescript-fixed-points": "^6.0.0", - "purescript-free": "^6.0.0", - "purescript-prelude": "^5.0.0", - "purescript-profunctor": "^5.0.0", - "purescript-transformers": "^5.0.0" + "purescript-fixed-points": "main", + "purescript-free": "master", + "purescript-prelude": "master", + "purescript-profunctor": "master", + "purescript-transformers": "master" }, "devDependencies": { - "purescript-console": "^5.0.0", - "purescript-effect": "^3.0.0" + "purescript-console": "master", + "purescript-effect": "master" } } 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 diff --git a/spago.dhall b/spago.dhall index e4d1c2b..7066ba9 100644 --- a/spago.dhall +++ b/spago.dhall @@ -14,7 +14,6 @@ , "newtype" , "prelude" , "profunctor" - , "psci-support" , "transformers" , "tuples" ] diff --git a/src/Matryoshka/DistributiveLaw.purs b/src/Matryoshka/DistributiveLaw.purs index 4f940c0..f662058 100644 --- a/src/Matryoshka/DistributiveLaw.purs +++ b/src/Matryoshka/DistributiveLaw.purs @@ -19,7 +19,7 @@ module Matryoshka.DistributiveLaw where import Prelude import Control.Comonad (class Comonad, extract) -import Control.Comonad.Cofree (Cofree, unfoldCofree, tail) +import Control.Comonad.Cofree (Cofree, buildCofree, tail) import Control.Comonad.Env.Trans (EnvT(..), runEnvT) import Control.Comonad.Trans.Class (lower) import Control.Monad.Except (ExceptT(..), runExceptT) @@ -81,7 +81,7 @@ distGHisto => Functor h => DistributiveLaw f h -> DistributiveLaw f (Cofree h) -distGHisto k = unfoldCofree (map extract) (k <<< map tail) +distGHisto k = buildCofree \s -> Tuple (map extract s) (k $ map tail s) distAna :: forall f. Functor f => DistributiveLaw Identity f distAna = map wrap <<< unwrap