on develop help sign in
Get rid of the noinlines for newSubscriber*
commit0db8ced12060e03f48e2ddac9ed1c76d09ee52ff authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 2 Aug 2016, 17:14 (10 years ago) parentf3ffc4e
1 file changed−16
src/Reflex/Spider/Internal.hs−16
src/Reflex/Spider/Internal.hs−16
@@ -260,43 +260,27 @@ data Subscriber x a
260260-- The result is also evaluated to WHNF, since forcing a thunk invalidates
261261-- the weak pointer to it in some cases.
262262
263−--TODO: I think all of these noinlines are now unnecessary
264−{-# NOINLINE newSubscriberPush #-}
265263newSubscriberPush :: (a -> ComputeM x (Maybe b)) -> PushSubscribed x a b -> IO (Subscriber x a)
266264newSubscriberPush compute subd = return $! SubscriberPush compute subd
267265
268−{-# RULES
269− "newSubscriberHold/Identity" forall h. newSubscriberHold h = newSubscriberHoldIdentity h
270− #-}
271−{-# NOINLINE newSubscriberHold #-}
272266newSubscriberHold :: R.Patch p => Hold x p a -> IO (Subscriber x (p a))
273267newSubscriberHold h = return $! SubscriberHold h
274268
275−{-# NOINLINE newSubscriberHoldIdentity #-}
276−newSubscriberHoldIdentity :: Hold x Identity a -> IO (Subscriber x (Identity a))
277−newSubscriberHoldIdentity h = return $! SubscriberHoldIdentity h
278−
279−{-# NOINLINE newSubscriberMerge #-}
280269newSubscriberMerge :: GCompare k => k a -> MergeSubscribed x k -> IO (Subscriber x a)
281270newSubscriberMerge k subd = return $! SubscriberMerge k subd
282271
283−{-# NOINLINE newSubscriberMergeChange #-}
284272newSubscriberMergeChange :: GCompare k => MergeSubscribed x k -> IO (Subscriber x (R.PatchDMap (DMap k (Event x))))
285273newSubscriberMergeChange subd = return $! SubscriberMergeChange subd
286274
287−{-# NOINLINE newSubscriberFan #-}
288275newSubscriberFan :: GCompare k => FanSubscribed x k -> IO (Subscriber x (DMap k Identity))
289276newSubscriberFan subd = return $! SubscriberFan subd
290277
291−{-# NOINLINE newSubscriberSwitch #-}
292278newSubscriberSwitch :: SwitchSubscribed x a -> IO (Subscriber x a)
293279newSubscriberSwitch subd = return $! SubscriberSwitch subd
294280
295−{-# NOINLINE newSubscriberCoincidenceOuter #-}
296281newSubscriberCoincidenceOuter :: CoincidenceSubscribed x b -> IO (Subscriber x (Event x b))
297282newSubscriberCoincidenceOuter subd = return $! SubscriberCoincidenceOuter subd
298283
299−{-# NOINLINE newSubscriberCoincidenceInner #-}
300284newSubscriberCoincidenceInner :: CoincidenceSubscribed x a -> IO (Subscriber x a)
301285newSubscriberCoincidenceInner subd = return $! SubscriberCoincidenceInner subd
302286