-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
118 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
/.* | ||
!/.gitignore | ||
!/.jscsrc | ||
!/.jshintrc | ||
!/.travis.yml | ||
/bower_components/ | ||
/node_modules/ | ||
/output/ | ||
/tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"preset": "grunt", | ||
"disallowSpacesInAnonymousFunctionExpression": null, | ||
"requireSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningRoundBrace": true, | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInsideObjectBrackets": null, | ||
"requireSpacesInsideObjectBrackets": "all", | ||
"validateQuoteMarks": "\"", | ||
"requireCurlyBraces": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"bitwise": true, | ||
"eqeqeq": true, | ||
"forin": true, | ||
"freeze": true, | ||
"funcscope": true, | ||
"futurehostile": true, | ||
"globalstrict": true, | ||
"latedef": true, | ||
"maxparams": 1, | ||
"noarg": true, | ||
"nocomma": true, | ||
"nonew": true, | ||
"notypeof": true, | ||
"singleGroups": true, | ||
"undef": true, | ||
"unused": true, | ||
"eqnull": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
{ | ||
"name": "purescript-semirings", | ||
"moduleType": [ | ||
"node" | ||
"name": "purescript-refs", | ||
"homepage": "https://github.com/purescript/purescript-refs", | ||
"description": "Mutable value references", | ||
"keywords": [ | ||
"purescript" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/purescript/purescript-refs.git" | ||
}, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"node_modules", | ||
"output", | ||
"test", | ||
"bower.json", | ||
"gulpfile.js", | ||
"package.json" | ||
], | ||
"dependencies": { | ||
"purescript-eff": "~0.1.0" | ||
"purescript-eff": "^0.1.0", | ||
"purescript-prelude": "^0.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,61 @@ | ||
/* jshint node: true */ | ||
"use strict"; | ||
|
||
var gulp = require("gulp"); | ||
var jshint = require("gulp-jshint"); | ||
var jscs = require("gulp-jscs"); | ||
var plumber = require("gulp-plumber"); | ||
var purescript = require("gulp-purescript"); | ||
var jsvalidate = require("gulp-jsvalidate"); | ||
var rimraf = require("rimraf"); | ||
|
||
var paths = [ | ||
var sources = [ | ||
"src/**/*.purs", | ||
"bower_components/purescript-*/src/**/*.purs" | ||
]; | ||
|
||
gulp.task("make", function() { | ||
return gulp.src(paths) | ||
.pipe(plumber()) | ||
.pipe(purescript.pscMake()); | ||
var foreigns = [ | ||
"src/**/*.js", | ||
"bower_components/purescript-*/src/**/*.js" | ||
]; | ||
|
||
gulp.task("clean-docs", function (cb) { | ||
rimraf("docs", cb); | ||
}); | ||
|
||
gulp.task("jsvalidate", ["make"], function () { | ||
return gulp.src("output/**/*.js") | ||
.pipe(plumber()) | ||
.pipe(jsvalidate()); | ||
gulp.task("clean-output", function (cb) { | ||
rimraf("output", cb); | ||
}); | ||
|
||
var docTasks = []; | ||
gulp.task("clean", ["clean-docs", "clean-output"]); | ||
|
||
var docTask = function(name) { | ||
var taskName = "docs-" + name.toLowerCase(); | ||
gulp.task(taskName, function () { | ||
return gulp.src("src/" + name.replace(/\./g, "/") + ".purs") | ||
.pipe(plumber()) | ||
.pipe(purescript.pscDocs()) | ||
.pipe(gulp.dest("docs/" + name + ".md")); | ||
}); | ||
docTasks.push(taskName); | ||
}; | ||
gulp.task("lint", function() { | ||
return gulp.src("src/**/*.js") | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter()) | ||
.pipe(jscs()); | ||
}); | ||
|
||
["Control.Monad.Eff.Ref", "Control.Monad.Eff.Unsafe"].forEach(docTask); | ||
gulp.task("make", ["lint"], function() { | ||
return gulp.src(sources) | ||
.pipe(plumber()) | ||
.pipe(purescript.pscMake({ ffi: foreigns })); | ||
}); | ||
|
||
gulp.task("docs", docTasks); | ||
gulp.task("docs", ["clean-docs"], function () { | ||
return gulp.src(sources) | ||
.pipe(plumber()) | ||
.pipe(purescript.pscDocs({ | ||
docgen: { | ||
"Control.Monad.Eff.Ref": "docs/Control.Monad.Eff.Ref.md", | ||
"Control.Monad.Eff.Ref.Unsafe": "docs/Control.Monad.Eff.Ref.Unsafe.md" | ||
} | ||
})); | ||
}); | ||
|
||
gulp.task("dotpsci", function () { | ||
return gulp.src(paths) | ||
return gulp.src(sources) | ||
.pipe(plumber()) | ||
.pipe(purescript.dotPsci()); | ||
}); | ||
|
||
gulp.task("default", ["jsvalidate", "docs", "dotpsci"]); | ||
gulp.task("default", ["make", "docs", "dotpsci"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters