Skip to content

Commit e88a90e

Browse files
Format code in docs
1 parent d1d2f0f commit e88a90e

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

src/Node/EventEmitter.purs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,28 @@
1919
-- |
2020
-- | Then we would write
2121
-- | ```
22-
-- | data Color = Red | Green | Blue
22+
-- | data Color
23+
-- | = Red
24+
-- | | Green
25+
-- | | Blue
2326
-- |
24-
-- | -- Note: see docs on `EventHandle` for the below naming convention justification of suffixing `H`.
25-
-- | barH :: EventHandle Foo (Maybe Error -> Color -> Effect Unit) (EffectFn1 (Nullable Error) String Unit)
26-
-- | barH = EventHandle "bar" $ \psCb -> mkEffectFn2 \nullableError str ->
27-
-- | psCb (toMaybe nullableError) case str of
28-
-- | "red" -> Red
29-
-- | "green" -> Green
30-
-- | "blue" -> Blue
31-
-- | _ -> unsafeCrashWith $ "Impossible String value for event 'bar': " <> show str
27+
-- | -- Note: see docs on `EventHandle`
28+
-- | -- for the below naming convention justification
29+
-- | -- of suffixing an event name with `H`.
30+
-- | barH
31+
-- | :: EventHandle
32+
-- | Foo
33+
-- | (Maybe Error -> Color -> Effect Unit)
34+
-- | (EffectFn1 (Nullable Error) String Unit)
35+
-- | barH = EventHandle "bar" $ \psCb ->
36+
-- | mkEffectFn2 \nullableError str ->
37+
-- | psCb (toMaybe nullableError) case str of
38+
-- | "red" -> Red
39+
-- | "green" -> Green
40+
-- | "blue" -> Blue
41+
-- | _ ->
42+
-- | unsafeCrashWith $
43+
-- | "Impossible String value for event 'bar': " <> show str
3244
-- | ```
3345
-- |
3446
-- | ## Emitting events via an `EventEmitter`

0 commit comments

Comments
 (0)