diff options
author | Joris | 2019-10-23 21:09:54 +0200 |
---|---|---|
committer | Joris | 2019-10-23 21:11:11 +0200 |
commit | f968c8ce63e1aec119b1e6f414cf27e2c0294bcb (patch) | |
tree | ab539d6d1618ad724498f5ad3954f74409f65383 /client/src/Util | |
parent | 61ff1443c42def5a09f624e3df2e2520e97610d0 (diff) |
Delete income
Diffstat (limited to 'client/src/Util')
-rw-r--r-- | client/src/Util/Reflex.hs | 8 |
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 |