Skip to content

Commit

Permalink
Merge pull request #11 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 09ecb4c + 7d45bb4 commit 8e2f955
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 54 deletions.
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parserOptions": {
"ecmaVersion": 5
},
"extends": "eslint:recommended",
"env": {
"commonjs": true
},
"rules": {
"strict": [2, "global"],
"block-scoped-var": 2,
"consistent-return": 2,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"no-caller": 2,
"no-extend-native": 2,
"no-loop-func": 2,
"no-new": 2,
"no-param-reassign": 2,
"no-return-assign": 2,
"no-unused-expressions": 2,
"no-use-before-define": 2,
"radix": [2, "always"],
"indent": [2, 2],
"quotes": [2, "double"],
"semi": [2, "always"]
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.*
!/.gitignore
!/.jscsrc
!/.jshintrc
!/.eslintrc.json
!/.travis.yml
/bower_components/
/node_modules/
Expand Down
17 changes: 0 additions & 17 deletions .jscsrc

This file was deleted.

20 changes: 0 additions & 20 deletions .jshintrc

This file was deleted.

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
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"package.json"
],
"dependencies": {
"purescript-eff": "^2.0.0"
"purescript-eff": "^3.0.0"
}
}
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && pulp build --censor-lib --strict"
"build": "eslint src && pulp build -- --censor-lib --strict"
},
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^9.0.1",
"purescript-psa": "^0.3.9",
"rimraf": "^2.5.0"
"eslint": "^3.17.1",
"pulp": "^10.0.4",
"purescript-psa": "^0.5.0-rc.1",
"rimraf": "^2.6.1"
}
}
6 changes: 2 additions & 4 deletions src/Control/Monad/ST.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ exports.readSTRef = function (ref) {
exports.modifySTRef = function (ref) {
return function (f) {
return function () {
/* jshint boss: true */
return ref.value = f(ref.value);
return ref.value = f(ref.value); // eslint-disable-line no-return-assign
};
};
};

exports.writeSTRef = function (ref) {
return function (a) {
return function () {
/* jshint boss: true */
return ref.value = a;
return ref.value = a; // eslint-disable-line no-return-assign
};
};
};
Expand Down
6 changes: 3 additions & 3 deletions src/Control/Monad/ST.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Control.Monad.ST where

import Control.Monad.Eff (Eff, runPure)
import Control.Monad.Eff (Eff, kind Effect, runPure)

-- | The `ST` effect represents _local mutation_, i.e. mutation which does not
-- | "escape" into the surrounding computation.
Expand All @@ -9,11 +9,11 @@ import Control.Monad.Eff (Eff, runPure)
-- | restrict the set of reference cells it is allowed to access.
-- |
-- | The `runST` function can be used to handle the `ST` effect.
foreign import data ST :: * -> !
foreign import data ST :: Type -> Effect

-- | The type `STRef h a` represents a mutable reference holding a value of
-- | type `a`, which can be used with the `ST h` effect.
foreign import data STRef :: * -> * -> *
foreign import data STRef :: Type -> Type -> Type

-- | Create a new mutable reference.
foreign import newSTRef
Expand Down

0 comments on commit 8e2f955

Please sign in to comment.