aboutsummaryrefslogtreecommitdiff
path: root/client/src/Util
diff options
context:
space:
mode:
authorJoris2019-10-23 21:09:54 +0200
committerJoris2019-10-23 21:11:11 +0200
commitf968c8ce63e1aec119b1e6f414cf27e2c0294bcb (patch)
treeab539d6d1618ad724498f5ad3954f74409f65383 /client/src/Util
parent61ff1443c42def5a09f624e3df2e2520e97610d0 (diff)
Delete income
Diffstat (limited to 'client/src/Util')
-rw-r--r--client/src/Util/Reflex.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/Util/Reflex.hs b/client/src/Util/Reflex.hs
index c14feeb..9f51c5c 100644
--- a/client/src/Util/Reflex.hs
+++ b/client/src/Util/Reflex.hs
@@ -4,6 +4,7 @@ module Util.Reflex
, divVisibleIf
, divClassVisibleIf
, flatten
+ , flattenTuple
, getBody
) where
@@ -44,6 +45,13 @@ flatten e = do
dyn <- R.holdDyn R.never e
return $ R.switchDyn dyn
+
+flattenTuple
+ :: forall t m a b. MonadWidget t m
+ => Event t (Event t a, Event t b)
+ -> m (Event t a, Event t b)
+flattenTuple e = (,) <$> (flatten $ fmap fst e) <*> (flatten $ fmap snd e)
+
getBody :: forall t m. MonadWidget t m => m Element
getBody = do
document <- Dom.currentDocumentUnchecked