Skip to content

Commit 01424eb

Browse files
committed
Update for PureScript 0.11
1 parent dd7a14c commit 01424eb

File tree

9 files changed

+49
-60
lines changed

9 files changed

+49
-60
lines changed

.eslintrc.json

Lines changed: 28 additions & 0 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 0 additions & 17 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 20 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
"package.json"
2222
],
2323
"dependencies": {
24-
"purescript-arrays": "^3.0.0",
25-
"purescript-either": "^2.0.0",
26-
"purescript-foldable-traversable": "^2.0.0",
27-
"purescript-functions": "^2.0.0",
28-
"purescript-integers": "^2.0.0",
29-
"purescript-lists": "^3.0.0",
30-
"purescript-strings": "^2.0.0",
31-
"purescript-transformers": "^2.0.0"
24+
"purescript-arrays": "^4.0.0",
25+
"purescript-either": "^3.0.0",
26+
"purescript-foldable-traversable": "^3.0.0",
27+
"purescript-functions": "^3.0.0",
28+
"purescript-integers": "^3.0.0",
29+
"purescript-lists": "^4.0.0",
30+
"purescript-strings": "^3.0.0",
31+
"purescript-transformers": "^3.0.0"
3232
},
3333
"devDependencies": {
34-
"purescript-console": "^2.0.0"
34+
"purescript-console": "^3.0.0"
3535
}
3636
}

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
6-
"test": "pulp build -I examples --censor-lib --strict"
5+
"build": "eslint src && pulp build -- --censor-lib --strict",
6+
"test": "pulp build -I examples -- --censor-lib --strict"
77
},
88
"devDependencies": {
9-
"jscs": "^3.0.7",
10-
"jshint": "^2.9.2",
11-
"pulp": "^9.0.1",
12-
"purescript-psa": "^0.3.9",
13-
"rimraf": "^2.5.4"
9+
"eslint": "^3.17.1",
10+
"pulp": "^10.0.4",
11+
"purescript-psa": "^0.5.0-rc.1",
12+
"rimraf": "^2.6.1"
1413
}
1514
}

src/Data/Foreign.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Data.String (toChar)
4949
-- |
5050
-- | - To represent responses from web services
5151
-- | - To integrate with external JavaScript libraries.
52-
foreign import data Foreign :: *
52+
foreign import data Foreign :: Type
5353

5454
-- | A type for foreign type errors
5555
data ForeignError

src/Data/Foreign/Class.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ readWith :: forall a e. IsForeign a => (MultipleErrors -> e) -> Foreign -> Excep
8383
readWith f = mapExcept (lmap f) <<< read
8484

8585
-- | Attempt to read a property of a foreign value at the specified index
86-
readProp :: forall a i. (IsForeign a, Index i) => i -> Foreign -> F a
86+
readProp :: forall a i. IsForeign a => Index i => i -> Foreign -> F a
8787
readProp prop value = value ! prop >>= readWith (map (errorAt prop))
8888

8989
-- | A type class to convert to a `Foreign` value.
@@ -129,10 +129,10 @@ writeProp k v = Prop { key: k, value: write v }
129129

130130
-- | Attempt to read a value that can be either one thing or another. This
131131
-- | implementation is right biased.
132-
readEitherR :: forall l r. (IsForeign l, IsForeign r) => Foreign -> F (Either l r)
132+
readEitherR :: forall l r. IsForeign l => IsForeign r => Foreign -> F (Either l r)
133133
readEitherR value = Right <$> read value <|> Left <$> read value
134134

135135
-- | Attempt to read a value that can be either one thing or another. This
136136
-- | implementation is left biased.
137-
readEitherL :: forall l r. (IsForeign l, IsForeign r) => Foreign -> F (Either l r)
137+
readEitherL :: forall l r. IsForeign l => IsForeign r => Foreign -> F (Either l r)
138138
readEitherL value = Left <$> read value <|> Right <$> read value

0 commit comments

Comments
 (0)