Skip to content

Commit 8a6204e

Browse files
committed
Updates for RC
1 parent 74210ce commit 8a6204e

File tree

7 files changed

+58
-43
lines changed

7 files changed

+58
-43
lines changed

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"package.json"
2525
],
2626
"dependencies": {
27-
"purescript-bifunctors": "~0.4.0",
28-
"purescript-maybe": "~0.3.0"
27+
"purescript-bifunctors": "^0.4.0",
28+
"purescript-maybe": "^0.3.0"
2929
},
3030
"devDependencies": {
31-
"purescript-console": "~0.1.0",
32-
"purescript-assert": "~0.1.0"
31+
"purescript-console": "^0.1.0",
32+
"purescript-assert": "^0.1.0"
3333
}
3434
}

docs/Data.Bifoldable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ ignoring the final result.
5454
#### `biany`
5555

5656
``` purescript
57-
biany :: forall t a b c. (Bifoldable t, BoundedLattice c) => (a -> c) -> (b -> c) -> t a b -> c
57+
biany :: forall t a b c. (Bifoldable t, BooleanAlgebra c) => (a -> c) -> (b -> c) -> t a b -> c
5858
```
5959

6060
Test whether a predicate holds at any position in a data structure.
6161

6262
#### `biall`
6363

6464
``` purescript
65-
biall :: forall t a b c. (Bifoldable t, BoundedLattice c) => (a -> c) -> (b -> c) -> t a b -> c
65+
biall :: forall t a b c. (Bifoldable t, BooleanAlgebra c) => (a -> c) -> (b -> c) -> t a b -> c
6666
```
6767

6868

docs/Data.Foldable.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ class Foldable f where
99
foldMap :: forall a m. (Monoid m) => (a -> m) -> f a -> m
1010
```
1111

12+
`Foldable` represents data structures which can be _folded_.
13+
14+
- `foldr` folds a structure from the right
15+
- `foldl` folds a structure from the left
16+
- `foldMap` folds a structure by accumulating values in a `Monoid`
17+
1218
##### Instances
1319
``` purescript
1420
instance foldableArray :: Foldable Array
@@ -17,17 +23,11 @@ instance foldableFirst :: Foldable First
1723
instance foldableLast :: Foldable Last
1824
instance foldableAdditive :: Foldable Additive
1925
instance foldableDual :: Foldable Dual
20-
instance foldableInf :: Foldable Inf
26+
instance foldableDisj :: Foldable Disj
27+
instance foldableConj :: Foldable Conj
2128
instance foldableMultiplicative :: Foldable Multiplicative
22-
instance foldableSup :: Foldable Sup
2329
```
2430

25-
`Foldable` represents data structures which can be _folded_.
26-
27-
- `foldr` folds a structure from the right
28-
- `foldl` folds a structure from the left
29-
- `foldMap` folds a structure by accumulating values in a `Monoid`
30-
3131
#### `fold`
3232

3333
``` purescript
@@ -106,31 +106,31 @@ combining adjacent elements using the specified separator.
106106
#### `and`
107107

108108
``` purescript
109-
and :: forall a f. (Foldable f, BoundedLattice a) => f a -> a
109+
and :: forall a f. (Foldable f, BooleanAlgebra a) => f a -> a
110110
```
111111

112112
Test whether all `Boolean` values in a data structure are `true`.
113113

114114
#### `or`
115115

116116
``` purescript
117-
or :: forall a f. (Foldable f, BoundedLattice a) => f a -> a
117+
or :: forall a f. (Foldable f, BooleanAlgebra a) => f a -> a
118118
```
119119

120120
Test whether any `Boolean` value in a data structure is `true`.
121121

122122
#### `any`
123123

124124
``` purescript
125-
any :: forall a b f. (Foldable f, BoundedLattice b) => (a -> b) -> f a -> b
125+
any :: forall a b f. (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b
126126
```
127127

128128
Test whether a predicate holds for any element in a data structure.
129129

130130
#### `all`
131131

132132
``` purescript
133-
all :: forall a b f. (Foldable f, BoundedLattice b) => (a -> b) -> f a -> b
133+
all :: forall a b f. (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b
134134
```
135135

136136
Test whether a predicate holds for all elements in a data structure.

docs/Data.Traversable.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@ class (Functor t, Foldable t) <= Traversable t where
88
sequence :: forall a m. (Applicative m) => t (m a) -> m (t a)
99
```
1010

11-
##### Instances
12-
``` purescript
13-
instance traversableArray :: Traversable Array
14-
instance traversableMaybe :: Traversable Maybe
15-
instance traversableFirst :: Traversable First
16-
instance traversableLast :: Traversable Last
17-
instance traversableAdditive :: Traversable Additive
18-
instance traversableDual :: Traversable Dual
19-
instance traversableInf :: Traversable Inf
20-
instance traversableMultiplicative :: Traversable Multiplicative
21-
instance traversableSup :: Traversable Sup
22-
```
23-
2411
`Traversable` represents data structures which can be _traversed_,
2512
accumulating results and effects in some `Applicative` functor.
2613

@@ -40,6 +27,19 @@ following sense:
4027

4128
- `foldMap f = runConst <<< traverse (Const <<< f)`
4229

30+
##### Instances
31+
``` purescript
32+
instance traversableArray :: Traversable Array
33+
instance traversableMaybe :: Traversable Maybe
34+
instance traversableFirst :: Traversable First
35+
instance traversableLast :: Traversable Last
36+
instance traversableAdditive :: Traversable Additive
37+
instance traversableDual :: Traversable Dual
38+
instance traversableConj :: Traversable Conj
39+
instance traversableDisj :: Traversable Disj
40+
instance traversableMultiplicative :: Traversable Multiplicative
41+
```
42+
4343
#### `for`
4444

4545
``` purescript

gulpfile.js

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,30 @@ var jshint = require("gulp-jshint");
77
var jscs = require("gulp-jscs");
88
var purescript = require("gulp-purescript");
99
var run = require("gulp-run");
10+
var rimraf = require("rimraf");
1011

1112
var sources = [
1213
"src/**/*.purs",
13-
"bower_components/purescript-*/src/**/*.purs"
14+
"bower_components/purescript-*/src/**/*.purs",
15+
"bower_components/purescript-*/test/**/*.purs"
1416
];
1517

1618
var foreigns = [
1719
"src/**/*.js",
18-
"bower_components/purescript-*/src/**/*.js"
20+
"bower_components/purescript-*/src/**/*.js",
21+
"bower_components/purescript-*/test/**/*.js"
1922
];
2023

24+
gulp.task("clean-docs", function (cb) {
25+
rimraf("docs", cb);
26+
});
27+
28+
gulp.task("clean-output", function (cb) {
29+
rimraf("output", cb);
30+
});
31+
32+
gulp.task("clean", ["clean-docs", "clean-output"]);
33+
2134
gulp.task("lint", function() {
2235
return gulp.src("src/**/*.js")
2336
.pipe(jshint())
@@ -31,7 +44,7 @@ gulp.task("make", ["lint"], function() {
3144
.pipe(purescript.pscMake({ ffi: foreigns }));
3245
});
3346

34-
gulp.task("docs", function () {
47+
gulp.task("docs", ["clean-docs"], function () {
3548
return gulp.src(sources)
3649
.pipe(plumber())
3750
.pipe(purescript.pscDocs({
@@ -53,10 +66,11 @@ gulp.task("dotpsci", function () {
5366
gulp.task("test", ["make"], function() {
5467
return gulp.src(sources.concat(["test/Main.purs"]))
5568
.pipe(plumber())
56-
.pipe(purescript.psc({ main: "Test.Main"
57-
, ffi: foreigns.concat(["test/Main.js"])
58-
}))
69+
.pipe(purescript.psc({
70+
main: "Test.Main",
71+
ffi: foreigns.concat(["test/Main.js"])
72+
}))
5973
.pipe(run("node"));
6074
});
6175

62-
gulp.task("default", ["make", "docs", "dotpsci"]);
76+
gulp.task("default", ["make", "docs", "dotpsci", "test"]);

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"private": true,
33
"devDependencies": {
44
"gulp": "^3.8.11",
5+
"gulp-jscs": "^1.6.0",
6+
"gulp-jshint": "^1.10.0",
57
"gulp-plumber": "^1.0.0",
6-
"gulp-purescript": "^0.5.0",
8+
"gulp-purescript": "^0.5.0-rc.1",
79
"gulp-run": "^1.6.7",
8-
"gulp-jscs": "^1.6.0",
9-
"gulp-jshint": "^1.10.0"
10+
"rimraf": "^2.3.4"
1011
}
1112
}

test/Main.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ module Test.Main where
33

44
import Prelude
55

6+
import Control.Monad.Eff.Console
7+
import Data.Foldable
68
import Data.Maybe
79
import Data.Monoid.Additive
8-
import Data.Foldable
910
import Data.Traversable
10-
import Console
1111
import Test.Assert
1212

1313
foreign import arrayFrom1UpTo :: Int -> Array Int

0 commit comments

Comments
 (0)