Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reflow type signature layout

  • Loading branch information...
commit 7ce72a838c1da06b7471c403267e5a982e7ac681 1 parent ccfe17a
@JohnLato JohnLato authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 FRP/Euphoria/Collection.hs
View
11 FRP/Euphoria/Collection.hs
@@ -100,14 +100,19 @@ mapCollection f aC = do
-- | Create an 'Event' stream of all updates from a collection, including
-- the items currently in it.
-collectionToUpdates :: forall k a. Collection k a -> SignalGen (Event (CollectionUpdate k a))
+collectionToUpdates
+ :: forall k a. Collection k a
+ -> SignalGen (Event (CollectionUpdate k a))
collectionToUpdates aC = do
- (cur,updateE) :: ([(k,a)], Event (CollectionUpdate k a)) <- snapshotCollection aC
+ (cur,updateE) <- snapshotCollection aC
initE <- onCreation (map (uncurry AddItem) cur)
initE' <- memoE $ flattenE initE
return (updateE `mappend` initE')
-sequenceCollection :: Enum k => Collection k (SignalGen a) -> SignalGen (Collection k a)
+sequenceCollection
+ :: Enum k
+ => Collection k (SignalGen a)
+ -> SignalGen (Collection k a)
sequenceCollection col = collectionToUpdates col
>>= generatorE . fmap sequenceA
>>= accumCollection
Please sign in to comment.
Something went wrong with that request. Please try again.