Skip to content

Commit

Permalink
Updated for 0.11 (#2)
Browse files Browse the repository at this point in the history
* Updated for 0.11

* Remove dev dependencies

* Lower purescript version
  • Loading branch information
natefaubion authored Apr 4, 2017
1 parent 32616a7 commit dabba46
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
11 changes: 4 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
"tests"
],
"dependencies": {
"purescript-prelude": "^2.0.0",
"purescript-aff": "^2.0.0",
"purescript-lists": "^3.2.0",
"purescript-foldable-traversable": "^2.0.0"
},
"devDependencies": {
"purescript-psci-support": "^2.0.0"
"purescript-prelude": "^3.0.0",
"purescript-aff": "^3.0.0",
"purescript-lists": "^4.0.0",
"purescript-foldable-traversable": "^3.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 @@
"test": "pulp test"
},
"dependencies": {
"purescript": "^0.10.2",
"purescript-psa": "^0.4.0",
"purescript": "^0.11.1",
"purescript-psa": "^0.5.0",
"rimraf": "^2.5.4",
"pulp": "^10.0.0"
"pulp": "^11.0.0"
}
}
4 changes: 2 additions & 2 deletions src/Control/Monad/Aff/Bus.purs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import Data.Tuple (Tuple(..))

data Cap

data Bus (r ∷ # *) a = Bus (AVar a) (AVar (List (AVar a)))
data Bus (r ∷ # Type) a = Bus (AVar a) (AVar (List (AVar a)))

type BusR = BusR' ()

Expand All @@ -59,7 +59,7 @@ make ∷ ∀ eff a. AffAVar eff (BusRW a)
make = do
cell AVar amakeVar
consumers AVar (List (AVar a)) ← makeVar' mempty
forkAff $ forever do
_ ← forkAff $ forever do
res ← takeVar cell
vars ← takeVar consumers
putVar consumers mempty
Expand Down
7 changes: 3 additions & 4 deletions test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE)
import Control.Monad.Eff.Exception (EXCEPTION, error, message)
import Control.Monad.Error.Class (throwError)
import Control.Monad.Rec.Class (forever)
import Data.Either (Either(..))

type Effects eff =
Expand Down Expand Up @@ -53,8 +52,8 @@ test_readWrite = do
modifyVar (_ + n) avar
proc

forkAff proc
forkAff proc
void $ forkAff proc
void $ forkAff proc

Bus.write 1 bus
Bus.write 2 bus
Expand All @@ -64,7 +63,7 @@ test_readWrite = do
assert <<< eq 212 =<< peekVar avar
log "OK"

main Eff (Effects (err EXCEPTION)) Unit
main Eff (Effects (exception EXCEPTION)) Unit
main = void $ launchAff do
log "Testing read/write/kill..."
test_readWrite

0 comments on commit dabba46

Please sign in to comment.