From 99797b64942dba5f436df0a3fc4f15e08348e524 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Fri, 20 May 2016 12:22:18 +0100 Subject: [PATCH] Update build, remainder operator alias --- .travis.yml | 13 +++++-------- package.json | 5 +++-- src/Math.js | 2 +- src/Math.purs | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36183ef..f9843c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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 diff --git a/package.json b/package.json index af45679..41356bc 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/src/Math.js b/src/Math.js index e9a7af8..f225f3a 100644 --- a/src/Math.js +++ b/src/Math.js @@ -48,7 +48,7 @@ exports.pow = function (n) { }; }; -exports["%"] = function (n) { +exports.remainder = function (n) { return function (m) { return n % m; }; diff --git a/src/Math.purs b/src/Math.purs index a9ba443..4f62e85 100644 --- a/src/Math.purs +++ b/src/Math.purs @@ -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