Skip to content

Commit

Permalink
Merge pull request #16 from fluture-js/avaq/sti3
Browse files Browse the repository at this point in the history
Add support for sanctuary-type-identifiers 3
  • Loading branch information
Avaq authored May 16, 2020
2 parents 21c53e3 + 95ca96c commit 5dad1bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ export function Hook(run) {
HookFromCallback.prototype = Object.create (Hook.prototype);

Hook['@@type'] = 'fluture/Hook@1';
Hook.constructor = {prototype: Hook};
Hook.of = Hook[$of] = x => Hook (Callback.of (x));

Hook.prototype['@@type'] = Hook['@@type'];

Hook.prototype[$ap] = function(mf) {
return Hook (Callback.ap (mf.run) (this.run));
};
Expand Down Expand Up @@ -137,8 +140,11 @@ export function ParallelHook(hook) {
ParallelHookFromHook.prototype = Object.create (ParallelHook.prototype);

ParallelHook['@@type'] = 'fluture/ParallelHook@1';
ParallelHook.constructor = {prototype: ParallelHook};
ParallelHook.of = ParallelHook[$of] = x => ParallelHook (pure (Hook) (x));

ParallelHook.prototype['@@type'] = ParallelHook['@@type'];

ParallelHook.prototype[$map] = function(f) {
return ParallelHook (map (f) (this.hook));
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"oletus": "^3.0.0",
"rollup": "^2.0.0",
"sanctuary-scripts": "^4.0.0",
"sanctuary-type-identifiers": "^2.0.1"
"sanctuary-type-identifiers": "^3.0.0"
}
}

0 comments on commit 5dad1bd

Please sign in to comment.