Skip to content

Commit 3e8897b

Browse files
committed
Added the main API docs
1 parent 515134b commit 3e8897b

File tree

2 files changed

+287
-1
lines changed

2 files changed

+287
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/generated-docs/*
66
!/generated-docs/md
77
/generated-docs/md/*
8-
!/generated-docs/md/React.Basic.Hooks.Store.*
8+
!/generated-docs/md/React.Halo.md
99
/.psc-package/
1010
/.psc*
1111
/.purs*

generated-docs/md/React.Halo.md

Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
## Module React.Halo
2+
3+
#### `component`
4+
5+
``` purescript
6+
component :: forall state action props. String -> ComponentSpec props state action Aff -> Effect (props -> JSX)
7+
```
8+
9+
#### `component_`
10+
11+
``` purescript
12+
component_ :: forall state action. String -> ComponentSpec Unit state action Aff -> Effect JSX
13+
```
14+
15+
#### `UseHalo`
16+
17+
``` purescript
18+
newtype UseHalo props state action hooks
19+
```
20+
21+
##### Instances
22+
``` purescript
23+
Newtype (UseHalo props state action hooks) _
24+
```
25+
26+
#### `useHalo`
27+
28+
``` purescript
29+
useHalo :: forall state action props. HookSpec props state action Aff -> Hook (UseHalo props state action) (state /\ (action -> Effect Unit))
30+
```
31+
32+
33+
### Re-exported from Control.Monad.Error.Class:
34+
35+
#### `throwError`
36+
37+
``` purescript
38+
throwError :: forall a m e. MonadThrow e m => e -> m a
39+
```
40+
41+
### Re-exported from Control.Monad.Reader:
42+
43+
#### `ask`
44+
45+
``` purescript
46+
ask :: forall m r. MonadAsk r m => m r
47+
```
48+
49+
#### `asks`
50+
51+
``` purescript
52+
asks :: forall r m a. MonadAsk r m => (r -> a) -> m a
53+
```
54+
55+
Projects a value from the global context in a `MonadAsk`.
56+
57+
### Re-exported from Control.Monad.State.Class:
58+
59+
#### `state`
60+
61+
``` purescript
62+
state :: forall a m s. MonadState s m => (s -> (Tuple a s)) -> m a
63+
```
64+
65+
#### `put`
66+
67+
``` purescript
68+
put :: forall m s. MonadState s m => s -> m Unit
69+
```
70+
71+
Set the state.
72+
73+
#### `modify_`
74+
75+
``` purescript
76+
modify_ :: forall s m. MonadState s m => (s -> s) -> m Unit
77+
```
78+
79+
#### `modify`
80+
81+
``` purescript
82+
modify :: forall s m. MonadState s m => (s -> s) -> m s
83+
```
84+
85+
Modify the state by applying a function to the current state. The returned
86+
value is the new state value.
87+
88+
#### `gets`
89+
90+
``` purescript
91+
gets :: forall s m a. MonadState s m => (s -> a) -> m a
92+
```
93+
94+
Get a value which depends on the current state.
95+
96+
#### `get`
97+
98+
``` purescript
99+
get :: forall m s. MonadState s m => m s
100+
```
101+
102+
Get the current state.
103+
104+
### Re-exported from Control.Monad.Trans.Class:
105+
106+
#### `lift`
107+
108+
``` purescript
109+
lift :: forall m a t. MonadTrans t => Monad m => m a -> t m a
110+
```
111+
112+
### Re-exported from Control.Monad.Writer:
113+
114+
#### `tell`
115+
116+
``` purescript
117+
tell :: forall m w. MonadTell w m => w -> m Unit
118+
```
119+
120+
### Re-exported from Effect.Aff.Class:
121+
122+
#### `liftAff`
123+
124+
``` purescript
125+
liftAff :: forall m. MonadAff m => Aff ~> m
126+
```
127+
128+
### Re-exported from Effect.Class:
129+
130+
#### `liftEffect`
131+
132+
``` purescript
133+
liftEffect :: forall a m. MonadEffect m => Effect a -> m a
134+
```
135+
136+
### Re-exported from React.Halo.Component:
137+
138+
#### `Lifecycle`
139+
140+
``` purescript
141+
data Lifecycle props action
142+
= Initialize props
143+
| Update props props
144+
| Action action
145+
| Finalize
146+
```
147+
148+
#### `HookSpec`
149+
150+
``` purescript
151+
type HookSpec props state action m = { eval :: Lifecycle props action -> HaloM props state action m Unit, initialState :: state, props :: props }
152+
```
153+
154+
#### `ComponentSpec`
155+
156+
``` purescript
157+
type ComponentSpec props state action m = { eval :: Lifecycle props action -> HaloM props state action m Unit, initialState :: state, render :: { props :: props, send :: action -> Effect Unit, state :: state } -> JSX }
158+
```
159+
160+
### Re-exported from React.Halo.Component.Control:
161+
162+
#### `SubscriptionId`
163+
164+
``` purescript
165+
newtype SubscriptionId
166+
```
167+
168+
##### Instances
169+
``` purescript
170+
Eq SubscriptionId
171+
Ord SubscriptionId
172+
```
173+
174+
#### `HaloM`
175+
176+
``` purescript
177+
newtype HaloM props state action m a
178+
```
179+
180+
##### Instances
181+
``` purescript
182+
Functor (HaloM props state action m)
183+
Apply (HaloM props state action m)
184+
Applicative (HaloM props state action m)
185+
Bind (HaloM props state action m)
186+
Monad (HaloM props state action m)
187+
(Semigroup a) => Semigroup (HaloM props state action m a)
188+
(Monoid a) => Monoid (HaloM props state action m a)
189+
MonadTrans (HaloM props state action)
190+
(MonadEffect m) => MonadEffect (HaloM props state action m)
191+
(MonadAff m) => MonadAff (HaloM props state action m)
192+
MonadState state (HaloM props state action m)
193+
MonadRec (HaloM props state action m)
194+
(MonadAsk r m) => MonadAsk r (HaloM props state action m)
195+
(MonadTell w m) => MonadTell w (HaloM props state action m)
196+
(MonadThrow e m) => MonadThrow e (HaloM props state action m)
197+
```
198+
199+
#### `HaloAp`
200+
201+
``` purescript
202+
newtype HaloAp props state action m a
203+
```
204+
205+
##### Instances
206+
``` purescript
207+
Newtype (HaloAp props state action m a) _
208+
Functor (HaloAp props state action m)
209+
Apply (HaloAp props state action m)
210+
Applicative (HaloAp props state action m)
211+
```
212+
213+
#### `ForkId`
214+
215+
``` purescript
216+
newtype ForkId
217+
```
218+
219+
##### Instances
220+
``` purescript
221+
Eq ForkId
222+
Ord ForkId
223+
```
224+
225+
#### `unsubscribe`
226+
227+
``` purescript
228+
unsubscribe :: forall m action state props. SubscriptionId -> HaloM props state action m Unit
229+
```
230+
231+
#### `subscribe'`
232+
233+
``` purescript
234+
subscribe' :: forall m action state props. (SubscriptionId -> Event action) -> HaloM props state action m SubscriptionId
235+
```
236+
237+
#### `subscribe`
238+
239+
``` purescript
240+
subscribe :: forall props state action m. Event action -> HaloM props state action m SubscriptionId
241+
```
242+
243+
#### `props`
244+
245+
``` purescript
246+
props :: forall props m action state. HaloM props state action m props
247+
```
248+
249+
#### `kill`
250+
251+
``` purescript
252+
kill :: forall m action state props. ForkId -> HaloM props state action m Unit
253+
```
254+
255+
#### `hoist`
256+
257+
``` purescript
258+
hoist :: forall props state action m m'. Functor m => (m ~> m') -> (HaloM props state action m) ~> (HaloM props state action m')
259+
```
260+
261+
#### `fork`
262+
263+
``` purescript
264+
fork :: forall m action state props. HaloM props state action m Unit -> HaloM props state action m ForkId
265+
```
266+
267+
### Re-exported from React.Halo.Eval:
268+
269+
#### `EvalSpec`
270+
271+
``` purescript
272+
type EvalSpec props action state m = { onAction :: action -> HaloM props state action m Unit, onFinalize :: Maybe action, onInitialize :: props -> Maybe action, onUpdate :: props -> props -> Maybe action }
273+
```
274+
275+
#### `makeEval`
276+
277+
``` purescript
278+
makeEval :: forall props action state m. EvalSpec props action state m -> Lifecycle props action -> HaloM props state action m Unit
279+
```
280+
281+
#### `defaultEval`
282+
283+
``` purescript
284+
defaultEval :: forall props action state m. EvalSpec props action state m
285+
```
286+

0 commit comments

Comments
 (0)