From 69f96224d13c38c3905e36262b8ee4db2fe13f2d Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Thu, 17 Mar 2016 22:34:20 +0000 Subject: [PATCH] Updates for PureScript 0.8 --- .jscsrc | 5 ++ .jshintrc | 5 +- .travis.yml | 16 +++++-- README.md | 5 +- bower.json | 5 +- docs/Control/Monad/Eff/Ref.md | 69 ---------------------------- docs/Control/Monad/Eff/Ref/Unsafe.md | 18 -------- package.json | 13 +++--- 8 files changed, 31 insertions(+), 105 deletions(-) delete mode 100644 docs/Control/Monad/Eff/Ref.md delete mode 100644 docs/Control/Monad/Eff/Ref/Unsafe.md diff --git a/.jscsrc b/.jscsrc index 342da66..2561ce9 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,5 +1,10 @@ { "preset": "grunt", + "disallowSpacesInFunctionExpression": null, + "requireSpacesInFunctionExpression": { + "beforeOpeningRoundBrace": true, + "beforeOpeningCurlyBrace": true + }, "disallowSpacesInAnonymousFunctionExpression": null, "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, diff --git a/.jshintrc b/.jshintrc index f391159..620d8d7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,7 +5,7 @@ "freeze": true, "funcscope": true, "futurehostile": true, - "globalstrict": true, + "strict": "global", "latedef": true, "maxparams": 1, "noarg": true, @@ -15,5 +15,6 @@ "singleGroups": true, "undef": true, "unused": true, - "eqnull": true + "eqnull": true, + "predef": ["exports"] } diff --git a/.travis.yml b/.travis.yml index 791313a..36183ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js -sudo: false -node_js: - - 0.10 +sudo: required +dist: trusty +node_js: 5 env: - PATH=$HOME/purescript:$PATH install: @@ -9,6 +9,16 @@ install: - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - chmod a+x $HOME/purescript + - npm install -g bower - npm install + - bower install script: - npm run 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}" diff --git a/README.md b/README.md index 2036099..441dffa 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Mutable value references. bower install purescript-refs ``` -## Module documentation +## Documentation -- [Control.Monad.Eff.Ref](docs/Control/Monad/Eff/Ref.md) -- [Control.Monad.Eff.Ref.Unsafe](docs/Control/Monad/Eff/Ref.Unsafe.md) +Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-refs). diff --git a/bower.json b/bower.json index 39b0dd5..06a2167 100644 --- a/bower.json +++ b/bower.json @@ -2,9 +2,6 @@ "name": "purescript-refs", "homepage": "https://github.com/purescript/purescript-refs", "description": "Mutable value references", - "keywords": [ - "purescript" - ], "license": "MIT", "repository": { "type": "git", @@ -20,6 +17,6 @@ "package.json" ], "dependencies": { - "purescript-eff": "^0.1.0" + "purescript-eff": "^1.0.0-rc.1" } } diff --git a/docs/Control/Monad/Eff/Ref.md b/docs/Control/Monad/Eff/Ref.md deleted file mode 100644 index bf73222..0000000 --- a/docs/Control/Monad/Eff/Ref.md +++ /dev/null @@ -1,69 +0,0 @@ -## Module Control.Monad.Eff.Ref - -This module defines an effect and actions for working with -global mutable variables. - -_Note_: The `Control.Monad.ST` provides a _safe_ alternative -to global mutable variables when mutation is restricted to a -local scope. - -#### `REF` - -``` purescript -data REF :: ! -``` - -The effect associated with the use of global mutable variables. - -#### `Ref` - -``` purescript -data Ref :: * -> * -``` - -A value of type `Ref a` represents a mutable reference -which holds a value of type `a`. - -#### `newRef` - -``` purescript -newRef :: forall s r. s -> Eff (ref :: REF | r) (Ref s) -``` - -Create a new mutable reference containing the specified value. - -#### `readRef` - -``` purescript -readRef :: forall s r. Ref s -> Eff (ref :: REF | r) s -``` - -Read the current value of a mutable reference - -#### `modifyRef'` - -``` purescript -modifyRef' :: forall s b r. Ref s -> (s -> { state :: s, value :: b }) -> Eff (ref :: REF | r) b -``` - -Update the value of a mutable reference by applying a function -to the current value. - -#### `modifyRef` - -``` purescript -modifyRef :: forall s r. Ref s -> (s -> s) -> Eff (ref :: REF | r) Unit -``` - -Update the value of a mutable reference by applying a function -to the current value. - -#### `writeRef` - -``` purescript -writeRef :: forall s r. Ref s -> s -> Eff (ref :: REF | r) Unit -``` - -Update the value of a mutable reference to the specified value. - - diff --git a/docs/Control/Monad/Eff/Ref/Unsafe.md b/docs/Control/Monad/Eff/Ref/Unsafe.md deleted file mode 100644 index cafdc3c..0000000 --- a/docs/Control/Monad/Eff/Ref/Unsafe.md +++ /dev/null @@ -1,18 +0,0 @@ -## Module Control.Monad.Eff.Ref.Unsafe - -Unsafe functions for working with mutable references. - -#### `unsafeRunRef` - -``` purescript -unsafeRunRef :: forall eff a. Eff (ref :: REF | eff) a -> Eff eff a -``` - -This handler function unsafely removes the `Ref` effect from an -effectful action. - -This function might be used when it is impossible to prove to the -typechecker that a particular mutable reference does not escape -its scope. - - diff --git a/package.json b/package.json index e129c49..55fc1c7 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "private": true, "scripts": { - "postinstall": "pulp dep install", - "build": "jshint src && jscs src && pulp build && rimraf docs && pulp docs" + "clean": "rimraf output && rimraf .pulp-cache", + "build": "jshint src && jscs src && pulp build", + "test": "jshint src && jscs src && pulp test" }, "devDependencies": { - "jscs": "^1.13.1", - "jshint": "^2.8.0", - "pulp": "^4.0.2", - "rimraf": "^2.4.1" + "jscs": "^2.8.0", + "jshint": "^2.9.1", + "pulp": "^8.1.0", + "rimraf": "^2.5.0" } }