1// Generated by purs version 0.13.6
3var Control_Applicative = require("../Control.Applicative/index.js");
4var Control_Bind = require("../Control.Bind/index.js");
5var Data_Function = require("../Data.Function/index.js");
6var Data_Maybe = require("../Data.Maybe/index.js");
7var Data_Newtype = require("../Data.Newtype/index.js");
8var Effect = require("../Effect/index.js");
9var Effect_Aff = require("../Effect.Aff/index.js");
10var Effect_Exception = require("../Effect.Exception/index.js");
11var React_Basic_Hooks = require("../React.Basic.Hooks/index.js");
12var React_Basic_Hooks_Internal = require("../React.Basic.Hooks.Internal/index.js");
13var Type_Equality = require("../Type.Equality/index.js");
14var UseAff = function (x) {
17var ntUseAff = new Data_Newtype.Newtype(function (n) {
20var useAff = function (dictEq) {
21 return function (key) {
22 return function (aff) {
23 return React_Basic_Hooks_Internal.coerceHook(ntUseAff)(React_Basic_Hooks_Internal.bind(React_Basic_Hooks_Internal.ixBindRender)(React_Basic_Hooks.useState(Data_Maybe.Nothing.value))(function (v) {
24 return React_Basic_Hooks_Internal.discard(React_Basic_Hooks_Internal.ixBindRender)(React_Basic_Hooks.useEffect(dictEq)(key)(Control_Bind.discard(Control_Bind.discardUnit)(Effect.bindEffect)(v.value1(Data_Function["const"](Data_Maybe.Nothing.value)))(function ($dollar__unused) {
25 return function __do() {
26 var fiber = Effect_Aff.runAff(function ($375) {
27 return v.value1(Data_Function["const"](Data_Maybe.Just.create($375)));
29 return Effect_Aff.launchAff_(Effect_Aff.killFiber(Effect_Exception.error("Effect hook discarded."))(fiber));
31 })))(function ($dollar__unused) {
32 return Control_Applicative.pure(React_Basic_Hooks_Internal.applicativeRender(Type_Equality.refl))(v.value0);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list