Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for PureScript 0.11 #10

Merged
merged 1 commit into from
Mar 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"package.json"
],
"dependencies": {
"purescript-partial": "^1.1.2",
"purescript-tuples": "^3.0.0"
"purescript-partial": "^1.2.0",
"purescript-tuples": "^4.0.0"
},
"devDependencies": {
"purescript-assert": "^2.0.0",
"purescript-console": "^2.0.0"
"purescript-assert": "^3.0.0",
"purescript-console": "^3.0.0"
}
}
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && psa \"src/**/*.purs\" \"bower_components/purescript-*/src/**/*.purs\" --censor-lib --strict",
"test": "psc \"src/**/*.purs\" \"bower_components/purescript-*/src/**/*.purs\" \"test/**/*.purs\" && psc-bundle \"output/**/*.js\" --module Test.Main --main Test.Main | node"
"build": "eslint src && pulp build -- --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^8.2.0",
"purescript-psa": "^0.3.8",
"rimraf": "^2.5.0"
"eslint": "^3.17.1",
"pulp": "^10.0.4",
"purescript-psa": "^0.5.0-rc.1",
"rimraf": "^2.6.1"
}
}
7 changes: 4 additions & 3 deletions src/Data/Unfoldable.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ exports.unfoldrArrayImpl = function (isNothing) {
return function (f) {
return function (b) {
var result = [];
while (true) {
var maybe = f(b);
var value = b;
while (true) { // eslint-disable-line no-constant-condition
var maybe = f(value);
if (isNothing(maybe)) return result;
var tuple = fromJust(maybe);
result.push(fst(tuple));
b = snd(tuple);
value = snd(tuple);
}
};
};
Expand Down
4 changes: 3 additions & 1 deletion src/Data/Unfoldable.purs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ replicate n v = unfoldr step n
-- | Perform an Applicative action `n` times, and accumulate all the results.
replicateA
:: forall m f a
. (Applicative m, Unfoldable f, Traversable f)
. Applicative m
=> Unfoldable f
=> Traversable f
=> Int
-> m a
-> m (f a)
Expand Down