Skip to content

Update for PureScript 0.11 #51

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

Merged
merged 1 commit into from
Mar 27, 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.

19 changes: 0 additions & 19 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
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"package.json"
],
"dependencies": {
"purescript-enums": "^2.0.0",
"purescript-functions": "^2.0.0",
"purescript-generics": "^3.0.0",
"purescript-integers": "^2.0.0",
"purescript-enums": "^3.0.0",
"purescript-functions": "^3.0.0",
"purescript-generics": "^4.0.0",
"purescript-integers": "^3.0.0",
"purescript-math": "^2.0.0"
},
"devDependencies": {
"purescript-assert": "^2.0.0",
"purescript-console": "^2.0.0"
"purescript-assert": "^3.0.0",
"purescript-console": "^3.0.0"
}
}
11 changes: 5 additions & 6 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 && pulp build --censor-lib --strict",
"build": "eslint src && pulp build -- --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^9.0.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"
}
}
5 changes: 1 addition & 4 deletions src/Data/DateTime/Instant.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ exports.fromDateTimeImpl = function (y, mo, d, h, mi, s, ms) {
exports.toDateTimeImpl = function (ctor) {
return function (instant) {
var dt = new Date(instant);
return ctor
(dt.getUTCFullYear())(dt.getUTCMonth() + 1)(dt.getUTCDate())
(dt.getUTCHours())(dt.getUTCMinutes())(dt.getUTCSeconds())
(dt.getUTCMilliseconds());
return ctor (dt.getUTCFullYear())(dt.getUTCMonth() + 1)(dt.getUTCDate())(dt.getUTCHours())(dt.getUTCMinutes())(dt.getUTCSeconds())(dt.getUTCMilliseconds());
};
};
2 changes: 1 addition & 1 deletion src/Data/Time/Duration.purs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Duration a where
toDuration :: Milliseconds -> a

-- | Converts directly between durations of differing types.
convertDuration :: forall a b. (Duration a, Duration b) => a -> b
convertDuration :: forall a b. Duration a => Duration b => a -> b
convertDuration = toDuration <<< fromDuration

instance durationMilliseconds :: Duration Milliseconds where
Expand Down