Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Commit

Permalink
Update build, remainder operator alias
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed May 20, 2016
1 parent 7ebeae0 commit 99797b6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
sudo: required
dist: trusty
node_js: 5
sudo: required
node_js: 6
env:
- PATH=$HOME/purescript:$PATH
install:
Expand All @@ -13,12 +13,9 @@ install:
- npm install
- bower install
script:
- npm run build
- npm run -s build
after_success:
- >-
test $TRAVIS_TAG &&
psc-publish > .pursuit.json &&
curl -X POST http://pursuit.purescript.org/packages \
-d @.pursuit.json \
-H 'Accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}"
echo $GITHUB_TOKEN | pulp login &&
echo y | pulp publish --no-push
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && pulp build"
"build": "jshint src && jscs src && pulp build --censor-lib --strict"
},
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^8.1.0",
"pulp": "^8.2.0",
"purescript-psa": "^0.3.8",
"rimraf": "^2.5.0"
}
}
2 changes: 1 addition & 1 deletion src/Math.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports.pow = function (n) {
};
};

exports["%"] = function (n) {
exports.remainder = function (n) {
return function (m) {
return n % m;
};
Expand Down
6 changes: 3 additions & 3 deletions src/Math.purs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ foreign import tan :: Radians -> Number
-- | number is positive, and `ceil` if the number is negative.
foreign import trunc :: Number -> Number

infixl 7 %

-- | Computes the remainder after division, wrapping Javascript's `%` operator.
foreign import (%) :: Number -> Number -> Number
foreign import remainder :: Number -> Number -> Number

infixl 7 remainder as %

-- | The base of natural logarithms, *e*, around 2.71828.
foreign import e :: Number
Expand Down

0 comments on commit 99797b6

Please sign in to comment.