Skip to content

Commit b776251

Browse files
committed
Updates for RC
1 parent 19f3bed commit b776251

File tree

9 files changed

+106
-192
lines changed

9 files changed

+106
-192
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/.*
22
!/.gitignore
3+
!/.jscsrc
4+
!/.jshintrc
35
!/.travis.yml
46
/bower_components/
57
/node_modules/
68
/output/
7-
/tmp/

.jscsrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"preset": "grunt",
3+
"disallowSpacesInAnonymousFunctionExpression": null,
4+
"requireSpacesInAnonymousFunctionExpression": {
5+
"beforeOpeningRoundBrace": true,
6+
"beforeOpeningCurlyBrace": true
7+
},
8+
"disallowSpacesInsideObjectBrackets": null,
9+
"requireSpacesInsideObjectBrackets": "all",
10+
"validateQuoteMarks": "\"",
11+
"requireCurlyBraces": null
12+
}

.jshintrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"bitwise": true,
3+
"eqeqeq": true,
4+
"forin": true,
5+
"freeze": true,
6+
"funcscope": true,
7+
"futurehostile": true,
8+
"globalstrict": true,
9+
"latedef": true,
10+
"maxparams": 1,
11+
"noarg": true,
12+
"nocomma": true,
13+
"nonew": true,
14+
"notypeof": true,
15+
"singleGroups": true,
16+
"undef": true,
17+
"unused": true,
18+
"eqnull": true
19+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ bower install purescript-lazy
1212

1313
## Module documentation
1414

15-
[`docs/Module.md`](docs/Module.md)
15+
- [Data.Lazy](docs/Data.Lazy.md)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"package.json"
2222
],
2323
"dependencies": {
24-
"purescript-monoid": "~0.3.0"
24+
"purescript-monoid": "^0.3.0"
2525
}
2626
}
Lines changed: 9 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Data.Lazy
42

5-
63
A monad for lazily-computed values
74

85
#### `Lazy`
@@ -22,189 +19,44 @@ type class instances.
2219

2320
`Lazy` values can be evaluated by using the `force` function.
2421

25-
#### `defer`
26-
27-
``` purescript
28-
defer :: forall a. (Unit -> a) -> Lazy a
29-
```
30-
31-
Defer a computation, creating a `Lazy` value.
32-
33-
#### `force`
34-
35-
``` purescript
36-
force :: forall a. Lazy a -> a
37-
```
38-
39-
Force evaluation of a `Lazy` value.
40-
41-
#### `semiringLazy`
42-
22+
##### Instances
4323
``` purescript
4424
instance semiringLazy :: (Semiring a) => Semiring (Lazy a)
45-
```
46-
47-
48-
#### `ringLazy`
49-
50-
``` purescript
5125
instance ringLazy :: (Ring a) => Ring (Lazy a)
52-
```
53-
54-
55-
#### `moduloSemiringLazy`
56-
57-
``` purescript
5826
instance moduloSemiringLazy :: (ModuloSemiring a) => ModuloSemiring (Lazy a)
59-
```
60-
61-
62-
#### `divisionRingLazy`
63-
64-
``` purescript
6527
instance divisionRingLazy :: (DivisionRing a) => DivisionRing (Lazy a)
66-
```
67-
68-
69-
#### `numLazy`
70-
71-
``` purescript
7228
instance numLazy :: (Num a) => Num (Lazy a)
73-
```
74-
75-
76-
#### `eqLazy`
77-
78-
``` purescript
7929
instance eqLazy :: (Eq a) => Eq (Lazy a)
80-
```
81-
82-
83-
#### `ordLazy`
84-
85-
``` purescript
8630
instance ordLazy :: (Ord a) => Ord (Lazy a)
87-
```
88-
89-
90-
#### `boundedLazy`
91-
92-
``` purescript
9331
instance boundedLazy :: (Bounded a) => Bounded (Lazy a)
94-
```
95-
96-
97-
#### `semigroupLazy`
98-
99-
``` purescript
10032
instance semigroupLazy :: (Semigroup a) => Semigroup (Lazy a)
101-
```
102-
103-
104-
#### `monoidLazy`
105-
106-
``` purescript
10733
instance monoidLazy :: (Monoid a) => Monoid (Lazy a)
108-
```
109-
110-
111-
#### `latticeLazy`
112-
113-
``` purescript
114-
instance latticeLazy :: (Lattice a) => Lattice (Lazy a)
115-
```
116-
117-
118-
#### `boundedLatticeLazy`
119-
120-
``` purescript
121-
instance boundedLatticeLazy :: (BoundedLattice a) => BoundedLattice (Lazy a)
122-
```
123-
124-
125-
#### `complementedLatticeLazy`
126-
127-
``` purescript
128-
instance complementedLatticeLazy :: (ComplementedLattice a) => ComplementedLattice (Lazy a)
129-
```
130-
131-
132-
#### `distributiveLatticeLazy`
133-
134-
``` purescript
135-
instance distributiveLatticeLazy :: (DistributiveLattice a) => DistributiveLattice (Lazy a)
136-
```
137-
138-
139-
#### `booleanAlgebraLazy`
140-
141-
``` purescript
14234
instance booleanAlgebraLazy :: (BooleanAlgebra a) => BooleanAlgebra (Lazy a)
143-
```
144-
145-
146-
#### `functorLazy`
147-
148-
``` purescript
14935
instance functorLazy :: Functor Lazy
150-
```
151-
152-
153-
#### `applyLazy`
154-
155-
``` purescript
15636
instance applyLazy :: Apply Lazy
157-
```
158-
159-
160-
#### `applicativeLazy`
161-
162-
``` purescript
16337
instance applicativeLazy :: Applicative Lazy
164-
```
165-
166-
167-
#### `bindLazy`
168-
169-
``` purescript
17038
instance bindLazy :: Bind Lazy
171-
```
172-
173-
174-
#### `monadLazy`
175-
176-
``` purescript
17739
instance monadLazy :: Monad Lazy
178-
```
179-
180-
181-
#### `extendLazy`
182-
183-
``` purescript
18440
instance extendLazy :: Extend Lazy
185-
```
186-
187-
188-
#### `comonadLazy`
189-
190-
``` purescript
19141
instance comonadLazy :: Comonad Lazy
42+
instance showLazy :: (Show a) => Show (Lazy a)
43+
instance lazyLazy :: Lazy (Lazy a)
19244
```
19345

194-
195-
#### `showLazy`
46+
#### `defer`
19647

19748
``` purescript
198-
instance showLazy :: (Show a) => Show (Lazy a)
49+
defer :: forall a. (Unit -> a) -> Lazy a
19950
```
20051

52+
Defer a computation, creating a `Lazy` value.
20153

202-
#### `lazyLazy`
54+
#### `force`
20355

20456
``` purescript
205-
instance lazyLazy :: CL.Lazy (Lazy a)
57+
force :: forall a. Lazy a -> a
20658
```
20759

208-
60+
Force evaluation of a `Lazy` value.
20961

21062

gulpfile.js

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
1+
/* jshint node: true */
12
"use strict";
23

34
var gulp = require("gulp");
5+
var jshint = require("gulp-jshint");
6+
var jscs = require("gulp-jscs");
47
var plumber = require("gulp-plumber");
58
var purescript = require("gulp-purescript");
6-
var jsvalidate = require("gulp-jsvalidate");
9+
var rimraf = require("rimraf");
710

8-
var paths = [
11+
var sources = [
912
"src/**/*.purs",
1013
"bower_components/purescript-*/src/**/*.purs"
1114
];
1215

13-
gulp.task("make", function() {
14-
return gulp.src(paths)
15-
.pipe(plumber())
16-
.pipe(purescript.pscMake());
16+
var foreigns = [
17+
"src/**/*.js",
18+
"bower_components/purescript-*/src/**/*.js"
19+
];
20+
21+
gulp.task("clean-docs", function (cb) {
22+
rimraf("docs", cb);
23+
});
24+
25+
gulp.task("clean-output", function (cb) {
26+
rimraf("output", cb);
27+
});
28+
29+
gulp.task("clean", ["clean-docs", "clean-output"]);
30+
31+
gulp.task("lint", function() {
32+
return gulp.src("src/**/*.js")
33+
.pipe(jshint())
34+
.pipe(jshint.reporter())
35+
.pipe(jscs());
1736
});
1837

19-
gulp.task("jsvalidate", ["make"], function () {
20-
return gulp.src("output/**/*.js")
38+
gulp.task("make", ["lint"], function() {
39+
return gulp.src(sources)
2140
.pipe(plumber())
22-
.pipe(jsvalidate());
41+
.pipe(purescript.pscMake({ ffi: foreigns }));
2342
});
2443

25-
gulp.task("docs", function () {
26-
return gulp.src("src/**/*.purs")
44+
gulp.task("docs", ["clean-docs"], function () {
45+
return gulp.src(sources)
2746
.pipe(plumber())
28-
.pipe(purescript.pscDocs())
29-
.pipe(gulp.dest("docs/MODULE.md"));
47+
.pipe(purescript.pscDocs({
48+
docgen: {
49+
"Data.Lazy": "docs/Data.Lazy.md"
50+
}
51+
}));
3052
});
3153

3254
gulp.task("dotpsci", function () {
33-
return gulp.src(paths)
55+
return gulp.src(sources)
3456
.pipe(plumber())
3557
.pipe(purescript.dotPsci());
3658
});
3759

38-
gulp.task("default", ["jsvalidate", "docs", "dotpsci"]);
60+
gulp.task("default", ["make", "docs", "dotpsci"]);

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"private": true,
33
"devDependencies": {
44
"gulp": "^3.8.11",
5-
"gulp-jsvalidate": "^1.0.1",
5+
"gulp-jscs": "^1.6.0",
6+
"gulp-jshint": "^1.10.0",
67
"gulp-plumber": "^1.0.0",
7-
"gulp-purescript": "^0.3.1"
8+
"gulp-purescript": "^0.5.0-rc.1",
9+
"rimraf": "^2.3.3"
810
}
911
}

0 commit comments

Comments
 (0)