Skip to content

Commit 8e2f955

Browse files
authored
Merge pull request #11 from purescript/ps-0.11
Update for PureScript 0.11
2 parents 09ecb4c + 7d45bb4 commit 8e2f955

File tree

9 files changed

+41
-54
lines changed

9 files changed

+41
-54
lines changed

.eslintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true
8+
},
9+
"rules": {
10+
"strict": [2, "global"],
11+
"block-scoped-var": 2,
12+
"consistent-return": 2,
13+
"eqeqeq": [2, "smart"],
14+
"guard-for-in": 2,
15+
"no-caller": 2,
16+
"no-extend-native": 2,
17+
"no-loop-func": 2,
18+
"no-new": 2,
19+
"no-param-reassign": 2,
20+
"no-return-assign": 2,
21+
"no-unused-expressions": 2,
22+
"no-use-before-define": 2,
23+
"radix": [2, "always"],
24+
"indent": [2, 2],
25+
"quotes": [2, "double"],
26+
"semi": [2, "always"]
27+
}
28+
}

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/.*
22
!/.gitignore
3-
!/.jscsrc
4-
!/.jshintrc
3+
!/.eslintrc.json
54
!/.travis.yml
65
/bower_components/
76
/node_modules/

.jscsrc

-17
This file was deleted.

.jshintrc

-20
This file was deleted.

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 6
4+
node_js: stable
55
env:
66
- PATH=$HOME/purescript:$PATH
77
install:

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-eff": "^2.0.0"
20+
"purescript-eff": "^3.0.0"
2121
}
2222
}

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "jshint src && jscs src && pulp build --censor-lib --strict"
5+
"build": "eslint src && pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"jscs": "^2.8.0",
9-
"jshint": "^2.9.1",
10-
"pulp": "^9.0.1",
11-
"purescript-psa": "^0.3.9",
12-
"rimraf": "^2.5.0"
8+
"eslint": "^3.17.1",
9+
"pulp": "^10.0.4",
10+
"purescript-psa": "^0.5.0-rc.1",
11+
"rimraf": "^2.6.1"
1312
}
1413
}

src/Control/Monad/ST.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ exports.readSTRef = function (ref) {
1515
exports.modifySTRef = function (ref) {
1616
return function (f) {
1717
return function () {
18-
/* jshint boss: true */
19-
return ref.value = f(ref.value);
18+
return ref.value = f(ref.value); // eslint-disable-line no-return-assign
2019
};
2120
};
2221
};
2322

2423
exports.writeSTRef = function (ref) {
2524
return function (a) {
2625
return function () {
27-
/* jshint boss: true */
28-
return ref.value = a;
26+
return ref.value = a; // eslint-disable-line no-return-assign
2927
};
3028
};
3129
};

src/Control/Monad/ST.purs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Control.Monad.ST where
22

3-
import Control.Monad.Eff (Eff, runPure)
3+
import Control.Monad.Eff (Eff, kind Effect, runPure)
44

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

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

1818
-- | Create a new mutable reference.
1919
foreign import newSTRef

0 commit comments

Comments
 (0)