Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #23 from purescript/0.8-updates
Browse files Browse the repository at this point in the history
Updates for PureScript 0.8
  • Loading branch information
garyb committed Mar 1, 2016
2 parents 1b40960 + f33d0d6 commit ad80f44
Show file tree
Hide file tree
Showing 18 changed files with 178 additions and 361 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
language: node_js
sudo: false
node_js:
- 0.10
- 5
env:
- PATH=$HOME/purescript:$PATH
install:
- 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')
- 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
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}"
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ Monoid algebraic structure.
bower install purescript-monoid
```

## Module documentation
## Documentation

- [Data.Monoid](docs/Data/Monoid.md)
- [Data.Monoid.Dual](docs/Data/Monoid/Dual.md)
- [Data.Monoid.Endo](docs/Data/Monoid/Endo.md)

### Monoids for semirings
- [Data.Monoid.Additive](docs/Data/Monoid/Additive.md)
- [Data.Monoid.Multiplicative](docs/Data/Monoid/Multiplicative.md)

### Monoids for boolean algebras
- [Data.Monoid.Conj](docs/Data/Monoid/Conj.md)
- [Data.Monoid.Disj](docs/Data/Monoid/Disj.md)
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-monoid).
7 changes: 2 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"name": "purescript-monoid",
"homepage": "https://github.com/purescript/purescript-monoid",
"description": "Monoid algebraic structure",
"keywords": [
"purescript"
],
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -20,7 +17,7 @@
"package.json"
],
"dependencies": {
"purescript-control": "^0.3.0",
"purescript-invariant": "^0.3.0"
"purescript-control": "^1.0.0-rc.1",
"purescript-invariant": "^1.0.0-rc.1"
}
}
29 changes: 0 additions & 29 deletions docs/Data/Monoid.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/Data/Monoid/Additive.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/Data/Monoid/Conj.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/Data/Monoid/Disj.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/Data/Monoid/Dual.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/Data/Monoid/Endo.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/Data/Monoid/Multiplicative.md

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"private": true,
"scripts": {
"postinstall": "pulp dep install",
"build": "pulp build && rimraf docs && pulp docs"
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build"
},
"devDependencies": {
"pulp": "^4.0.2",
"rimraf": "^2.4.1"
"pulp": "^8.0.0",
"rimraf": "^2.5.0"
}
}
13 changes: 9 additions & 4 deletions src/Data/Monoid.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module Data.Monoid where
module Data.Monoid
( class Monoid, mempty
, module Data.Semigroup
) where

import Prelude
import Data.Function (const)
import Data.Semigroup (class Semigroup, append, (<>))
import Data.Unit (Unit, unit)

-- | A `Monoid` is a `Semigroup` with a value `mempty`, which is both a
-- | left and right unit for the associative operation `<>`:
Expand All @@ -12,13 +17,13 @@ import Prelude
-- | `Monoid`s are commonly used as the result of fold operations, where
-- | `<>` is used to combine individual results, and `mempty` gives the result
-- | of folding an empty collection of elements.
class (Semigroup m) <= Monoid m where
class Semigroup m <= Monoid m where
mempty :: m

instance monoidUnit :: Monoid Unit where
mempty = unit

instance monoidFn :: (Monoid b) => Monoid (a -> b) where
instance monoidFn :: Monoid b => Monoid (a -> b) where
mempty = const mempty

instance monoidString :: Monoid String where
Expand Down
Loading

0 comments on commit ad80f44

Please sign in to comment.