Skip to content

Commit 8a6bfdc

Browse files
committed
Merge pull request #6 from purescript/0.8-updates
Updates for PureScript 0.8
2 parents ff2d0df + f3ff60a commit 8a6bfdc

File tree

7 files changed

+47
-68
lines changed

7 files changed

+47
-68
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
/bower_components/
55
/node_modules/
66
/output/
7-
/tmp/

.travis.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
language: node_js
2-
sudo: false
3-
node_js:
4-
- 0.10
2+
sudo: required
3+
dist: trusty
4+
node_js: 5
55
env:
66
- PATH=$HOME/purescript:$PATH
77
install:
88
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
99
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
1010
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
1111
- chmod a+x $HOME/purescript
12+
- npm install -g bower
1213
- npm install
14+
- bower install
1315
script:
1416
- npm run build
17+
after_success:
18+
- >-
19+
test $TRAVIS_TAG &&
20+
psc-publish > .pursuit.json &&
21+
curl -X POST http://pursuit.purescript.org/packages \
22+
-d @.pursuit.json \
23+
-H 'Accept: application/json' \
24+
-H "Authorization: token ${GITHUB_TOKEN}"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Identity value.
1212
bower install purescript-identity
1313
```
1414

15-
## Module documentation
15+
## Documentation
1616

17-
- [Data.Identity](docs/Data/Identity.md)
17+
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-identity).

bower.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"name": "purescript-identity",
33
"homepage": "https://github.com/purescript/purescript-identity",
44
"description": "Identity value",
5-
"keywords": [
6-
"purescript"
7-
],
85
"authors": [
96
"Gary Burgess <[email protected]>",
107
"Hardy Jones <[email protected]>"
@@ -24,6 +21,6 @@
2421
"package.json"
2522
],
2623
"dependencies": {
27-
"purescript-foldable-traversable": "^0.4.0"
24+
"purescript-foldable-traversable": "^1.0.0-rc.1"
2825
}
2926
}

docs/Data.Identity.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"private": true,
33
"scripts": {
4-
"postinstall": "pulp dep install",
5-
"build": "pulp build && rimraf docs && pulp docs"
4+
"clean": "rimraf output && rimraf .pulp-cache",
5+
"build": "pulp build"
66
},
77
"devDependencies": {
8-
"pulp": "^4.0.2",
9-
"rimraf": "^2.4.1"
8+
"pulp": "^8.1.0",
9+
"rimraf": "^2.5.0"
1010
}
1111
}

src/Data/Identity.purs

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
module Data.Identity where
22

3-
import Prelude
4-
5-
import Control.Comonad (Comonad)
6-
import Control.Extend (Extend)
7-
import Data.Foldable (Foldable)
8-
import Data.Functor.Invariant (Invariant, imapF)
9-
import Data.Monoid (Monoid, mempty)
10-
import Data.Traversable (Traversable)
3+
import Control.Applicative (class Applicative)
4+
import Control.Apply (class Apply)
5+
import Control.Bind (class Bind)
6+
import Control.Comonad (class Comonad)
7+
import Control.Extend (class Extend)
8+
import Control.Monad (class Monad)
9+
10+
import Data.BooleanAlgebra (class BooleanAlgebra, not, (||), (&&))
11+
import Data.Bounded (class Bounded, bottom, top)
12+
import Data.BoundedOrd (class BoundedOrd)
13+
import Data.DivisionRing (class DivisionRing)
14+
import Data.Eq (class Eq, (==))
15+
import Data.Foldable (class Foldable)
16+
import Data.Functor (class Functor, (<$>))
17+
import Data.Functor.Invariant (class Invariant, imapF)
18+
import Data.ModuloSemiring (class ModuloSemiring, mod, (/))
19+
import Data.Monoid (class Monoid, mempty)
20+
import Data.Num (class Num)
21+
import Data.Ord (class Ord, compare)
22+
import Data.Ring (class Ring, (-))
23+
import Data.Semigroup (class Semigroup, (<>))
24+
import Data.Semiring (class Semiring, one, zero, (+), (*))
25+
import Data.Show (class Show, show)
26+
import Data.Traversable (class Traversable)
1127

1228
newtype Identity a = Identity a
1329

@@ -27,8 +43,8 @@ instance boundedIdentity :: (Bounded a) => Bounded (Identity a) where
2743
instance boundedOrdIdentity :: (BoundedOrd a) => BoundedOrd (Identity a)
2844

2945
instance booleanAlgebraIdentity :: (BooleanAlgebra a) => BooleanAlgebra (Identity a) where
30-
conj (Identity x) (Identity y) = Identity (conj x y)
31-
disj (Identity x) (Identity y) = Identity (disj x y)
46+
conj (Identity x) (Identity y) = Identity (x && y)
47+
disj (Identity x) (Identity y) = Identity (x || y)
3248
not (Identity x) = Identity (not x)
3349

3450
instance semigroupIdenity :: (Semigroup a) => Semigroup (Identity a) where
@@ -55,7 +71,7 @@ instance divisionRingIdentity :: (DivisionRing a) => DivisionRing (Identity a)
5571
instance numIdentity :: (Num a) => Num (Identity a)
5672

5773
instance showIdentity :: (Show a) => Show (Identity a) where
58-
show (Identity x) = "Identity (" ++ show x ++ ")"
74+
show (Identity x) = "(Identity " <> show x <> ")"
5975

6076
instance functorIdentity :: Functor Identity where
6177
map f (Identity x) = Identity (f x)

0 commit comments

Comments
 (0)