Skip to content

Commit

Permalink
Updates for RC
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed Jun 14, 2015
1 parent b9912e6 commit ad30714
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 86 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# purescript-these

## Getting Started
[![Build Status](https://travis-ci.org/purescript/purescript-these.svg?branch=master)](https://travis-ci.org/purescript/purescript-these)

- Read the [module documentation](MODULES.md).
Data type ismorphic to `α ∨ β ∨ (α ∧ β)`

## Installation

```
bower install purescript-these
```

## Module documentation

- [Data.These](docs/Data.These.md)
4 changes: 0 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"name": "purescript-these",
"version": "0.1.0",
"description": "Data type ismorphic to: α ̧̣̣∨ β ∨ (α ∧ β)",
"license": "MIT",
"dependencies": {
"purescript-bifunctors": "^0.4.0",
"purescript-foldable-traversable": "^0.4.0",
"purescript-monoid": "^0.3.0",
"purescript-prelude": "^0.1.0",
"purescript-tuples": "^0.4.0"
}
}
74 changes: 1 addition & 73 deletions MODULES.md → docs/Data.These.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Module Documentation

## Module Data.These

#### `These`
Expand All @@ -11,125 +9,55 @@ data These a b
| Both a b
```


#### `semigroupThese`

##### Instances
``` purescript
instance semigroupThese :: (Semigroup a, Semigroup b) => Semigroup (These a b)
```


#### `functorThese`

``` purescript
instance functorThese :: Functor (These a)
```


#### `foldableThese`

``` purescript
instance foldableThese :: Foldable (These a)
```


#### `traversableThese`

``` purescript
instance traversableThese :: Traversable (These a)
```


#### `bifunctorThese`

``` purescript
instance bifunctorThese :: Bifunctor These
```


#### `bifoldableThese`

``` purescript
instance bifoldableThese :: Bifoldable These
```


#### `bitraversableThese`

``` purescript
instance bitraversableThese :: Bitraversable These
```


#### `applyThese`

``` purescript
instance applyThese :: (Semigroup a) => Apply (These a)
```


#### `applicativeThese`

``` purescript
instance applicativeThese :: (Semigroup a) => Applicative (These a)
```


#### `bindThese`

``` purescript
instance bindThese :: (Semigroup a) => Bind (These a)
```


#### `monadThese`

``` purescript
instance monadThese :: (Semigroup a) => Monad (These a)
```


#### `these`

``` purescript
these :: forall a b c. (a -> c) -> (b -> c) -> (a -> b -> c) -> These a b -> c
```


#### `thisOrBoth`

``` purescript
thisOrBoth :: forall a b. a -> Maybe b -> These a b
```


#### `thatOrBoth`

``` purescript
thatOrBoth :: forall a b. b -> Maybe a -> These a b
```


#### `fromThese`

``` purescript
fromThese :: forall a b. a -> b -> These a b -> Tuple a b
```


#### `theseLeft`

``` purescript
theseLeft :: forall a b. These a b -> Maybe a
```


#### `theseRight`

``` purescript
theseRight :: forall a b. These a b -> Maybe b
```




31 changes: 25 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,42 @@
var gulp = require("gulp");
var plumber = require("gulp-plumber");
var purescript = require("gulp-purescript");
var rimraf = require("rimraf");

var sources = [
"src/**/*.purs",
"bower_components/purescript-*/src/**/*.purs"
];

var foreigns = [
"src/**/*.js",
"bower_components/purescript-*/src/**/*.js"
];

gulp.task("clean-docs", function (cb) {
rimraf("docs", cb);
});

gulp.task("clean-output", function (cb) {
rimraf("output", cb);
});

gulp.task("clean", ["clean-docs", "clean-output"]);

gulp.task("make", function() {
return gulp.src(sources)
.pipe(plumber())
.pipe(purescript.pscMake());
.pipe(purescript.pscMake({ ffi: foreigns }));
});

gulp.task("docs", function () {
return gulp.src(["src/**/*.purs"])
gulp.task("docs", ["clean-docs"], function () {
return gulp.src(sources)
.pipe(plumber())
.pipe(purescript.pscDocs())
.pipe(gulp.dest("MODULES.md"));
.pipe(purescript.pscDocs({
docgen: {
"Data.These": "docs/Data.These.md"
}
}));
});

gulp.task("dotpsci", function () {
Expand All @@ -29,4 +48,4 @@ gulp.task("dotpsci", function () {
.pipe(purescript.dotPsci());
});

gulp.task("default", ["make", "docs"]);
gulp.task("default", ["make", "docs", "dotpsci"]);
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"devDependencies": {
"gulp": "^3.8.11",
"gulp-plumber": "^1.0.0",
"gulp-purescript": "^0.4.2"
"gulp-purescript": "^0.5.0-rc.1",
"rimraf": "^2.3.3"
}
}

0 comments on commit ad30714

Please sign in to comment.