Skip to content

Commit

Permalink
Update to PureScript v0.15.0 (#26)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JordanMartinez authored Mar 22, 2022
1 parent 2e415d9 commit 162d74f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
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 [email protected]
npx bower install
npx pulp build -- --censor-lib --strict
if [ -d "test" ]; then
npx pulp test
fi
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
14 changes: 7 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
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 @@ -14,7 +14,6 @@
, "newtype"
, "prelude"
, "profunctor"
, "psci-support"
, "transformers"
, "tuples"
]
Expand Down
4 changes: 2 additions & 2 deletions src/Matryoshka/DistributiveLaw.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 162d74f

Please sign in to comment.