Skip to content

Commit

Permalink
Update for PureScript 0.15 (#37)
Browse files Browse the repository at this point in the history
* Update for PureScript 0.15

* Update README.md

* Update README.md

* Update package.json
  • Loading branch information
thomashoneyman authored May 2, 2022
1 parent bbcbb66 commit abec7c3
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 99 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
npm install
npm install -g bower
bower install --production
- name: Build and test
run: |
npm run -s build
bower install
npm run -s test
npm run -s check
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# purescript-run

[![Latest release](http://img.shields.io/github/release/natefaubion/purescript-run.svg)](https://github.com/natefaubion/purescript-run/releases)
[![Build status](https://travis-ci.org/natefaubion/purescript-run.svg?branch=master)](https://travis-ci.org/natefaubion/purescript-run)
[![Build status](https://github.com/natefaubion/purescript-run/workflows/CI/badge.svg?branch=master)](https://github.com/natefaubion/purescript-run/actions?query=workflow%3ACI+branch%3Amaster)

An [extensible-effects](https://hackage.haskell.org/package/extensible-effects)
implementation for PureScript.
Expand Down
34 changes: 17 additions & 17 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
"test"
],
"dependencies": {
"purescript-aff": "^6.0.0",
"purescript-either": "^5.0.0",
"purescript-free": "^6.0.0",
"purescript-maybe": "^5.0.0",
"purescript-newtype": "^4.0.0",
"purescript-prelude": "^5.0.0",
"purescript-tailrec": "^5.0.0",
"purescript-tuples": "^6.0.0",
"purescript-aff": "^7.0.0",
"purescript-either": "^6.0.0",
"purescript-free": "^7.0.0",
"purescript-maybe": "^6.0.0",
"purescript-newtype": "^5.0.0",
"purescript-prelude": "^6.0.0",
"purescript-tailrec": "^6.0.0",
"purescript-tuples": "^7.0.0",
"purescript-type-equality": "^4.0.0",
"purescript-unsafe-coerce": "^5.0.0",
"purescript-variant": "^7.0.1",
"purescript-profunctor": "^5.0.0",
"purescript-effect": "^3.0.0",
"purescript-typelevel-prelude": "^6.0.0"
"purescript-unsafe-coerce": "^6.0.0",
"purescript-variant": "^8.0.0",
"purescript-profunctor": "^6.0.0",
"purescript-effect": "^4.0.0",
"purescript-typelevel-prelude": "^7.0.0"
},
"devDependencies": {
"purescript-control": "^5.0.0",
"purescript-minibench": "^3.0.0",
"purescript-identity": "^5.0.0",
"purescript-console": "^5.0.0"
"purescript-control": "^6.0.0",
"purescript-minibench": "^4.0.0",
"purescript-identity": "^6.0.0",
"purescript-console": "^6.0.0"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"ide": "purs ide server"
},
"devDependencies": {
"pulp": "^15.0.0",
"purescript": "^0.14.4",
"pulp": "^16.0.0",
"purescript": "^0.15.0",
"purescript-psa": "^0.8.2",
"purs-tidy": "^0.4.6"
"purs-tidy": "^0.8.0"
}
}
4 changes: 2 additions & 2 deletions src/Run.purs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ instance monadRecRun :: MonadRec (Run r) where
-- | Lifts an effect functor into the `Run` Monad according to the provided
-- | `Proxy` slot.
lift
:: forall proxy sym r1 r2 f a
:: forall sym r1 r2 f a
. Row.Cons sym f r1 r2
=> IsSymbol sym
=> Functor f
=> proxy sym
=> Proxy sym
-> f a
-> Run r2 a
lift p = Run <<< liftF <<< inj p
Expand Down
36 changes: 18 additions & 18 deletions src/Run/Except.purs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ liftExcept :: forall e a r. Except e a -> Run (EXCEPT e + r) a
liftExcept = liftExceptAt _except

liftExceptAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> Except e a
-> Run r a
liftExceptAt = Run.lift
Expand All @@ -67,10 +67,10 @@ throw :: forall e a r. e -> Run (EXCEPT e + r) a
throw = throwAt _except

throwAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> e
-> Run r a
throwAt sym = liftExceptAt sym <<< Except
Expand All @@ -79,21 +79,21 @@ fail :: forall a r. Run (FAIL + r) a
fail = failAt _except

failAt
:: forall proxy t a r s
:: forall t a r s
. IsSymbol s
=> Row.Cons s Fail t r
=> proxy s
=> Proxy s
-> Run r a
failAt sym = throwAt sym unit

rethrow :: forall e a r. Either e a -> Run (EXCEPT e + r) a
rethrow = rethrowAt _except

rethrowAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> Either e a
-> Run r a
rethrowAt sym = either (throwAt sym) pure
Expand All @@ -102,10 +102,10 @@ note :: forall e a r. e -> Maybe a -> Run (EXCEPT e + r) a
note = noteAt _except

noteAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> e
-> Maybe a
-> Run r a
Expand All @@ -115,10 +115,10 @@ fromJust :: forall a r. Maybe a -> Run (FAIL + r) a
fromJust = fromJustAt _except

fromJustAt
:: forall proxy t a r s
:: forall t a r s
. IsSymbol s
=> Row.Cons s Fail t r
=> proxy s
=> Proxy s
-> Maybe a
-> Run r a
fromJustAt sym = noteAt sym unit
Expand All @@ -127,10 +127,10 @@ catch :: forall e a r. (e -> Run r a) -> Run (EXCEPT e + r) a -> Run r a
catch = catchAt _except

catchAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> (e -> Run t a)
-> Run r a
-> Run t a
Expand All @@ -150,10 +150,10 @@ runExcept :: forall e a r. Run (EXCEPT e + r) a -> Run r (Either e a)
runExcept = runExceptAt _except

runExceptAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Except e) t r
=> proxy s
=> Proxy s
-> Run r a
-> Run t (Either e a)
runExceptAt sym = loop
Expand All @@ -172,10 +172,10 @@ runFail :: forall a r. Run (FAIL + r) a -> Run r (Maybe a)
runFail = runFailAt _except

runFailAt
:: forall proxy t a r s
:: forall t a r s
. IsSymbol s
=> Row.Cons s Fail t r
=> proxy s
=> Proxy s
-> Run r a
-> Run t (Maybe a)
runFailAt sym = map (either (const Nothing) Just) <<< runExceptAt sym
20 changes: 10 additions & 10 deletions src/Run/Reader.purs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ liftReader :: forall e a r. Reader e a -> Run (READER e + r) a
liftReader = liftReaderAt _reader

liftReaderAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Reader e) t r
=> proxy s
=> Proxy s
-> Reader e a
-> Run r a
liftReaderAt = Run.lift
Expand All @@ -49,21 +49,21 @@ ask :: forall e r. Run (READER e + r) e
ask = askAt _reader

askAt
:: forall proxy t e r s
:: forall t e r s
. IsSymbol s
=> Row.Cons s (Reader e) t r
=> proxy s
=> Proxy s
-> Run r e
askAt sym = asksAt sym identity

asks :: forall e r a. (e -> a) -> Run (READER e + r) a
asks = asksAt _reader

asksAt
:: forall proxy t e r s a
:: forall t e r s a
. IsSymbol s
=> Row.Cons s (Reader e) t r
=> proxy s
=> Proxy s
-> (e -> a)
-> Run r a
asksAt sym f = liftReaderAt sym (Reader f)
Expand All @@ -72,10 +72,10 @@ local :: forall e a r. (e -> e) -> Run (READER e + r) a -> Run (READER e + r) a
local = localAt _reader

localAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Reader e) t r
=> proxy s
=> Proxy s
-> (e -> e)
-> Run r a
-> Run r a
Expand All @@ -97,10 +97,10 @@ runReader :: forall e a r. e -> Run (READER e + r) a -> Run r a
runReader = runReaderAt _reader

runReaderAt
:: forall proxy t e a r s
:: forall t e a r s
. IsSymbol s
=> Row.Cons s (Reader e) t r
=> proxy s
=> Proxy s
-> e
-> Run r a
-> Run t a
Expand Down
Loading

0 comments on commit abec7c3

Please sign in to comment.