Skip to content

Commit

Permalink
Merge pull request #92 from purescript/ps-0.11
Browse files Browse the repository at this point in the history
Update for PureScript 0.11
  • Loading branch information
garyb authored Mar 26, 2017
2 parents 8517996 + 847f03e commit c213455
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
node_js: stable
env:
- PATH=$HOME/purescript:$PATH
install:
Expand Down
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"package.json"
],
"dependencies": {
"purescript-arrays": "^3.0.0",
"purescript-lazy": "^2.0.0",
"purescript-distributive": "^2.0.0",
"purescript-tuples": "^3.0.0"
"purescript-arrays": "^4.0.0",
"purescript-lazy": "^3.0.0",
"purescript-distributive": "^3.0.0",
"purescript-tuples": "^4.0.0"
},
"devDependencies": {
"purescript-console": "^2.0.0"
"purescript-console": "^3.0.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build --censor-lib --strict",
"build": "pulp build -- --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
"pulp": "^9.0.1",
"purescript-psa": "^0.3.9",
"rimraf": "^2.5.0"
"pulp": "^10.0.4",
"purescript-psa": "^0.5.0-rc.1",
"rimraf": "^2.6.1"
}
}
2 changes: 1 addition & 1 deletion src/Control/Comonad/Store/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Comonad w <= ComonadStore s w | w -> s where
peek :: forall a. s -> w a -> a

-- | Extract a collection of values from positions which depend on the current position.
experiment :: forall f a w s. (ComonadStore s w, Functor f) => (s -> f s) -> w a -> f a
experiment :: forall f a w s. ComonadStore s w => Functor f => (s -> f s) -> w a -> f a
experiment f x = flip peek x <$> f (pos x)

-- | Extract a value from a position which depends on the current position.
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Monad/State/Trans.purs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ withStateT f (StateT s) = StateT (s <<< f)
derive instance newtypeStateT :: Newtype (StateT s m a) _

instance functorStateT :: Functor m => Functor (StateT s m) where
map f (StateT a) = StateT (\s -> map (\(Tuple b s) -> Tuple (f b) s) (a s))
map f (StateT a) = StateT (\s -> map (\(Tuple b s') -> Tuple (f b) s') (a s))

instance applyStateT :: Monad m => Apply (StateT s m) where
apply = ap
Expand Down
6 changes: 3 additions & 3 deletions test/Example/Cont.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import Control.Monad.Eff.Class (class MonadEff, liftEff)
import Control.Monad.Eff.Console (CONSOLE, log)
import Control.Monad.Cont.Trans (ContT, runContT, callCC)

main0 :: forall s m eff. (MonadEff (console :: CONSOLE | eff) m) => ContT s m String
main0 :: forall s m eff. MonadEff (console :: CONSOLE | eff) m => ContT s m String
main0 = callCC \k -> do
liftEff $ log "Before the continuation"
k "You should see this."
void $ liftEff $ log "Before the continuation"
void $ k "You should see this."
k "You should not see this."

main :: forall eff. Eff (console :: CONSOLE | eff) Unit
Expand Down
8 changes: 4 additions & 4 deletions test/Example/StateEff.purs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ push x = do

testState :: forall r. Stack (console :: CONSOLE | r) Int
testState = do
push 1
push 2
push 3
pop
void $ push 1
void $ push 2
void $ push 3
void $ pop
pop

main :: forall eff. Eff (console :: CONSOLE | eff) Unit
Expand Down

0 comments on commit c213455

Please sign in to comment.