on develop help sign in
Merge branch 'develop' into canhazmerge
commite5d5946eb2e9569a67214c9f392f074cdbe8c2ce authorOliver Batchelor <saulzar@gmail.com> dateFri 19 Jul 2019, 23:31 (7 years ago) parent5feea42bccbe42
9 files changed+55−61
ChangeLog.md+12−5 default.nix+1−1 reflex.cabal+5−4 src/Data/Functor/Misc.hs+2−11 src/Reflex/Class.hs+3−4 src/Reflex/Patch/DMapWithMove.hs+6−7 src/Reflex/Query/Base.hs+5−6 src/Reflex/Requester/Base.hs+2−3 src/Reflex/Spider/Internal.hs+19−20
ChangeLog.md+12−5
@@ -2,11 +2,18 @@
22
33## Unreleased
44
5−* Fix `holdDyn` so that it is lazy in its event argument
6−* Generalize `merge` to `mergeG`, `mergeIncremental` to
7− `mergeIncrementalG`, and `mergeIncrementalWithMove`
8− to `mergeIncrementalWithMoveG`. These produce `DMap`s
9− whose values needn't be `Identity`.
5+* Generalize merging functions:
6+ `merge` to `mergeG`,
7+ `mergeIncremental` to `mergeIncrementalG`,
8+ `distributeDMapOverDynPure` to `distributeDMapOverDynPureG`,
9+ `mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.
10+
11+## 0.6.2.0
12+
13+* Fix `holdDyn` so that it is lazy in its event argument
14+ These produce `DMap`s whose values needn't be `Identity`.
15+* Stop using the now-deprecated `*Tag` classes (e.g., `ShowTag`).
16+* Fix `holdDyn` so that it is lazy in its event argument.
1017
1118## 0.6.1.0
1219
default.nix+1−1
@@ -11,7 +11,7 @@
1111}:
1212mkDerivation {
1313 pname = "reflex";
14− version = "0.6.1";
14+ version = "0.6.2.0";
1515 src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [ ".git" "dist" ])) ./.;
1616 libraryHaskellDepends = [
1717 base bifunctors containers dependent-map dependent-sum
reflex.cabal+5−4
@@ -1,5 +1,5 @@
11Name: reflex
2−Version: 0.6.1
2+Version: 0.6.2.0
33Synopsis: Higher-order Functional Reactive Programming
44Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
55License: BSD3
@@ -44,9 +44,10 @@ library
4444 base >= 4.9 && < 4.13,
4545 bifunctors >= 5.2 && < 5.6,
4646 comonad,
47+ constraints-extras >= 0.2,
4748 containers >= 0.5 && < 0.7,
4849 data-default >= 0.5 && < 0.8,
49− dependent-map >= 0.2.4 && < 0.3,
50+ dependent-map >= 0.3 && < 0.4,
5051 exception-transformers == 0.4.*,
5152 profunctors,
5253 lens >= 4.7 && < 5,
@@ -134,7 +135,7 @@ library
134135 if flag(use-template-haskell)
135136 cpp-options: -DUSE_TEMPLATE_HASKELL
136137 build-depends:
137− dependent-sum >= 0.3 && < 0.5,
138+ dependent-sum >= 0.6 && < 0.7,
138139 haskell-src-exts >= 1.16 && < 1.22,
139140 haskell-src-meta >= 0.6 && < 0.9,
140141 template-haskell >= 2.9 && < 2.15
@@ -143,7 +144,7 @@ library
143144 other-extensions: TemplateHaskell
144145 else
145146 build-depends:
146− dependent-sum == 0.4.*
147+ dependent-sum == 0.6.*
147148
148149 if flag(fast-weak) && impl(ghcjs)
149150 cpp-options: -DGHCJS_FAST_WEAK
src/Data/Functor/Misc.hs+2−11
@@ -52,8 +52,7 @@ import Data.IntMap (IntMap)
5252import qualified Data.IntMap as IntMap
5353import Data.Map (Map)
5454import qualified Data.Map as Map
55−import Data.Some (Some)
56−import qualified Data.Some as Some
55+import Data.Some (Some(Some))
5756import Data.These
5857import Data.Typeable hiding (Refl)
5958
@@ -79,9 +78,6 @@ deriving instance Read k => Read (Const2 k v v)
7978instance Show k => GShow (Const2 k v) where
8079 gshowsPrec n x@(Const2 _) = showsPrec n x
8180
82−instance (Show k, Show (f v)) => ShowTag (Const2 k v) f where
83− showTaggedPrec (Const2 _) = showsPrec
84−
8581instance Eq k => GEq (Const2 k v) where
8682 geq (Const2 a) (Const2 b) =
8783 if a == b
@@ -124,7 +120,7 @@ intMapWithFunctorToDMap = DMap.fromDistinctAscList . map (\(k, v) -> Const2 k :=
124120-- | Convert a 'DMap' to a regular 'Map' by forgetting the types associated with
125121-- the keys, using a function to remove the wrapping 'Functor'
126122weakenDMapWith :: (forall a. v a -> v') -> DMap k v -> Map (Some k) v'
127−weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (Some.This k, f v)) . DMap.toAscList
123+weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (Some k, f v)) . DMap.toAscList
128124
129125--------------------------------------------------------------------------------
130126-- WrapArg
@@ -214,11 +210,6 @@ instance GShow (EitherTag l r) where
214210 LeftTag -> showString "LeftTag"
215211 RightTag -> showString "RightTag"
216212
217−instance (Show l, Show r) => ShowTag (EitherTag l r) Identity where
218− showTaggedPrec t n (Identity a) = case t of
219− LeftTag -> showsPrec n a
220− RightTag -> showsPrec n a
221−
222213-- | Convert 'Either' to a 'DSum'. Inverse of 'dsumToEither'.
223214eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
224215eitherToDSum = \case
src/Reflex/Class.hs+3−4
@@ -198,8 +198,7 @@ import qualified Data.IntMap.Strict as IntMap
198198import Data.List.NonEmpty (NonEmpty (..))
199199import Data.Map (Map)
200200import Data.Semigroup (Semigroup, sconcat, stimes, (<>))
201−import Data.Some (Some)
202−import qualified Data.Some as Some
201+import Data.Some (Some(Some))
203202import Data.String
204203import Data.These
205204import Data.Type.Coercion
@@ -1176,9 +1175,9 @@ factorEvent
11761175 -> Event t (DSum k v)
11771176 -> m (Event t (v a), Event t (DSum k (Product v (Compose (Event t) v))))
11781177factorEvent k0 kv' = do
1179− key :: Behavior t (Some k) <- hold (Some.This k0) $ fmapCheap (\(k :=> _) -> Some.This k) kv'
1178+ key :: Behavior t (Some k) <- hold (Some k0) $ fmapCheap (\(k :=> _) -> Some k) kv'
11801179 let update = flip push kv' $ \(newKey :=> newVal) -> sample key >>= \case
1181− Some.This oldKey -> case newKey `geq` oldKey of
1180+ Some oldKey -> case newKey `geq` oldKey of
11821181 Just Refl -> return Nothing
11831182 Nothing -> do
11841183 newInner <- filterEventKey newKey kv'
src/Reflex/Patch/DMapWithMove.hs+6−7
@@ -19,9 +19,9 @@ import Reflex.Patch.Class
1919import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
2020import qualified Reflex.Patch.MapWithMove as MapWithMove
2121
22+import Data.Constraint.Extras
2223import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
2324import qualified Data.Dependent.Map as DMap
24−import Data.Dependent.Sum (EqTag (..))
2525import Data.Functor.Constant
2626import Data.Functor.Misc
2727import Data.Functor.Product
@@ -30,8 +30,7 @@ import Data.GADT.Show (GShow, gshow)
3030import qualified Data.Map as Map
3131import Data.Maybe
3232import Data.Semigroup (Semigroup (..), (<>))
33−import Data.Some (Some)
34−import qualified Data.Some as Some
33+import Data.Some (Some(Some))
3534import Data.These
3635
3736-- | Like 'PatchMapWithMove', but for 'DMap'. Each key carries a 'NodeInfo' which describes how it will be changed by the patch and connects move sources and
@@ -105,8 +104,8 @@ validationErrorsForPatchDMapWithMove m =
105104 unbalancedMove _ = Nothing
106105
107106-- |Test whether two @'PatchDMapWithMove' k v@ contain the same patch operations.
108−instance EqTag k (NodeInfo k v) => Eq (PatchDMapWithMove k v) where
109− PatchDMapWithMove a == PatchDMapWithMove b = a == b
107+instance (GEq k, Has' Eq k (NodeInfo k v)) => Eq (PatchDMapWithMove k v) where
108+ PatchDMapWithMove a == PatchDMapWithMove b = a == b
110109
111110-- |Higher kinded 2-tuple, identical to @Data.Functor.Product@ from base ≥ 4.9
112111data Pair1 f g a = Pair1 (f a) (g a)
@@ -311,8 +310,8 @@ weakenPatchDMapWithMoveWith f (PatchDMapWithMove p) = PatchMapWithMove $ weakenD
311310 { MapWithMove._nodeInfo_from = case _nodeInfo_from ni of
312311 From_Insert v -> MapWithMove.From_Insert $ f v
313312 From_Delete -> MapWithMove.From_Delete
314− From_Move k -> MapWithMove.From_Move $ Some.This k
315− , MapWithMove._nodeInfo_to = Some.This <$> getComposeMaybe (_nodeInfo_to ni)
313+ From_Move k -> MapWithMove.From_Move $ Some k
314+ , MapWithMove._nodeInfo_to = Some <$> getComposeMaybe (_nodeInfo_to ni)
316315 }
317316
318317-- |"Weaken" a @'PatchDMapWithMove' (Const2 k a) v@ to a @'PatchMapWithMove' k v'@. Weaken is in scare quotes because the 'Const2' has already disabled any
src/Reflex/Query/Base.hs+5−6
@@ -38,8 +38,7 @@ import Data.Map (Map)
3838import qualified Data.Map as Map
3939import Data.Monoid ((<>))
4040import qualified Data.Semigroup as S
41−import Data.Some (Some)
42−import qualified Data.Some as Some
41+import Data.Some (Some(Some))
4342import Data.These
4443
4544import Reflex.Class
@@ -145,10 +144,10 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
145144 liftedResult' = fforCheap result' $ \(PatchDMap p) -> PatchDMap $
146145 mapKeyValuePairsMonotonic (\(k :=> ComposeMaybe mr) -> k :=> ComposeMaybe (fmap (getQueryTLoweredResultValue . getCompose) mr)) p
147146 liftedBs0 :: Map (Some k) [Behavior t q]
148− liftedBs0 = Map.fromDistinctAscList $ (\(k :=> Compose r) -> (Some.This k, getQueryTLoweredResultWritten r)) <$> DMap.toList result0
147+ liftedBs0 = Map.fromDistinctAscList $ (\(k :=> Compose r) -> (Some k, getQueryTLoweredResultWritten r)) <$> DMap.toList result0
149148 liftedBs' :: Event t (PatchMap (Some k) [Behavior t q])
150149 liftedBs' = fforCheap result' $ \(PatchDMap p) -> PatchMap $
151− Map.fromDistinctAscList $ (\(k :=> ComposeMaybe mr) -> (Some.This k, fmap (getQueryTLoweredResultWritten . getCompose) mr)) <$> DMap.toList p
150+ Map.fromDistinctAscList $ (\(k :=> ComposeMaybe mr) -> (Some k, fmap (getQueryTLoweredResultWritten . getCompose) mr)) <$> DMap.toList p
152151 sampleBs :: forall m'. MonadSample t m' => [Behavior t q] -> m' q
153152 sampleBs = foldlM (\b a -> (b <>) <$> sample a) mempty
154153 accumBehaviors :: forall m'. MonadHold t m'
@@ -189,10 +188,10 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
189188 let liftedResult0 = mapKeyValuePairsMonotonic (\(k :=> Compose r) -> k :=> getQueryTLoweredResultValue r) result0
190189 liftedResult' = fforCheap result' $ mapPatchDMapWithMove (getQueryTLoweredResultValue . getCompose)
191190 liftedBs0 :: Map (Some k) [Behavior t q]
192− liftedBs0 = Map.fromDistinctAscList $ (\(k :=> Compose r) -> (Some.This k, getQueryTLoweredResultWritten r)) <$> DMap.toList result0
191+ liftedBs0 = Map.fromDistinctAscList $ (\(k :=> Compose r) -> (Some k, getQueryTLoweredResultWritten r)) <$> DMap.toList result0
193192 liftedBs' :: Event t (PatchMapWithMove (Some k) [Behavior t q])
194193 liftedBs' = fforCheap result' $ weakenPatchDMapWithMoveWith (getQueryTLoweredResultWritten . getCompose) {- \(PatchDMap p) -> PatchMapWithMove $
195− Map.fromDistinctAscList $ (\(k :=> mr) -> (Some.This k, fmap (fmap (getQueryTLoweredResultWritten . getCompose)) mr)) <$> DMap.toList p -}
194+ Map.fromDistinctAscList $ (\(k :=> mr) -> (Some k, fmap (fmap (getQueryTLoweredResultWritten . getCompose)) mr)) <$> DMap.toList p -}
196195 sampleBs :: forall m'. MonadSample t m' => [Behavior t q] -> m' q
197196 sampleBs = foldlM (\b a -> (b <>) <$> sample a) mempty
198197 accumBehaviors' :: forall m'. MonadHold t m'
src/Reflex/Requester/Base.hs+2−3
@@ -66,8 +66,7 @@ import qualified Data.Map as Map
6666import Data.Monoid ((<>))
6767import Data.Proxy
6868import qualified Data.Semigroup as S
69−import Data.Some (Some)
70−import qualified Data.Some as Some
69+import Data.Some (Some(Some))
7170import Data.Type.Equality
7271import Data.Unique.Tag
7372
@@ -441,7 +440,7 @@ traverseDMapWithKeyWithAdjustRequesterTWith base mapPatch weakenPatchWith patchN
441440 pack = Entry
442441 f' :: forall a. k a -> Compose ((,) Int) v a -> m (Compose ((,) (Event t (IntMap (RequesterData request)))) v' a)
443442 f' k (Compose (n, v)) = do
444− (result, myRequests) <- runRequesterT (f k v) $ mapMaybeCheap (IntMap.lookup n) $ select responses (Const2 (Some.This k))
443+ (result, myRequests) <- runRequesterT (f k v) $ mapMaybeCheap (IntMap.lookup n) $ select responses (Const2 (Some k))
445444 return $ Compose (fmapCheap (IntMap.singleton n) myRequests, result)
446445 ndm' <- numberOccurrencesFrom 1 dm'
447446 (children0, children') <- base f' (DMap.map (\v -> Compose (0, v)) dm0) $ fmap (\(n, dm) -> mapPatch (\v -> Compose (n, v)) dm) ndm'
src/Reflex/Spider/Internal.hs+19−20
@@ -78,8 +78,7 @@ import Data.Tree (Forest, Tree (..), drawForest)
7878import Data.FastWeakBag (FastWeakBag)
7979import qualified Data.FastWeakBag as FastWeakBag
8080import Data.Reflection
81−import Data.Some (Some)
82−import qualified Data.Some as Some
81+import Data.Some (Some(Some))
8382import Data.Type.Coercion
8483import Data.Profunctor.Unsafe ((#.), (.#))
8584import Data.WeakBag (WeakBag, WeakBagTicket, _weakBag_children)
@@ -587,7 +586,7 @@ eventSubscribedFan !subscribed = EventSubscribed
587586 { eventSubscribedHeightRef = eventSubscribedHeightRef $ _eventSubscription_subscribed $ fanSubscribedParent subscribed
588587 , eventSubscribedRetained = toAny subscribed
589588#ifdef DEBUG_CYCLES
590− , eventSubscribedGetParents = return [Some.This $ _eventSubscription_subscribed $ fanSubscribedParent subscribed]
589+ , eventSubscribedGetParents = return [Some $ _eventSubscription_subscribed $ fanSubscribedParent subscribed]
591590 , eventSubscribedHasOwnHeightRef = False
592591 , eventSubscribedWhoCreated = whoCreatedIORef $ fanSubscribedCachedSubscribed subscribed
593592#endif
@@ -600,7 +599,7 @@ eventSubscribedSwitch !subscribed = EventSubscribed
600599#ifdef DEBUG_CYCLES
601600 , eventSubscribedGetParents = do
602601 s <- readIORef $ switchSubscribedCurrentParent subscribed
603− return [Some.This $ _eventSubscription_subscribed s]
602+ return [Some $ _eventSubscription_subscribed s]
604603 , eventSubscribedHasOwnHeightRef = True
605604 , eventSubscribedWhoCreated = whoCreatedIORef $ switchSubscribedCachedSubscribed subscribed
606605#endif
@@ -613,8 +612,8 @@ eventSubscribedCoincidence !subscribed = EventSubscribed
613612#ifdef DEBUG_CYCLES
614613 , eventSubscribedGetParents = do
615614 innerSubscription <- readIORef $ coincidenceSubscribedInnerParent subscribed
616− let outerParent = Some.This $ _eventSubscription_subscribed $ coincidenceSubscribedOuterParent subscribed
617− innerParents = maybeToList $ fmap Some.This innerSubscription
615+ let outerParent = Some $ _eventSubscription_subscribed $ coincidenceSubscribedOuterParent subscribed
616+ innerParents = maybeToList $ fmap Some innerSubscription
618617 return $ outerParent : innerParents
619618 , eventSubscribedHasOwnHeightRef = True
620619 , eventSubscribedWhoCreated = whoCreatedIORef $ coincidenceSubscribedCachedSubscribed subscribed
@@ -630,13 +629,13 @@ whoCreatedEventSubscribed = eventSubscribedWhoCreated
630629
631630walkInvalidHeightParents :: EventSubscribed x -> IO [Some (EventSubscribed x)]
632631walkInvalidHeightParents s0 = do
633− subscribers <- flip execStateT mempty $ ($ Some.This s0) $ fix $ \loop (Some.This s) -> do
632+ subscribers <- flip execStateT mempty $ ($ Some s0) $ fix $ \loop (Some s) -> do
634633 h <- liftIO $ readIORef $ eventSubscribedHeightRef s
635634 when (h == invalidHeight) $ do
636635 when (eventSubscribedHasOwnHeightRef s) $ liftIO $ writeIORef (eventSubscribedHeightRef s) $! invalidHeightBeingTraversed
637− modify (Some.This s :)
636+ modify (Some s :)
638637 mapM_ loop =<< liftIO (eventSubscribedGetParents s)
639− forM_ subscribers $ \(Some.This s) -> writeIORef (eventSubscribedHeightRef s) $! invalidHeight
638+ forM_ subscribers $ \(Some s) -> writeIORef (eventSubscribedHeightRef s) $! invalidHeight
640639 return subscribers
641640#endif
642641
@@ -664,7 +663,7 @@ behaviorPull !p = Behavior $ do
664663 val <- liftIO $ readIORef $ pullValue p
665664 case val of
666665 Just subscribed -> do
667− askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some.This (BehaviorSubscribedPull subscribed)) :))
666+ askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some (BehaviorSubscribedPull subscribed)) :))
668667 askInvalidator >>= mapM_ (\wi -> liftIO $ modifyIORef' (pullSubscribedInvalidators subscribed) (wi:))
669668 liftIO $ touch $ pullSubscribedOwnInvalidator subscribed
670669 return $ pullSubscribedValue subscribed
@@ -683,7 +682,7 @@ behaviorPull !p = Behavior $ do
683682 , pullSubscribedParents = parents
684683 }
685684 liftIO $ writeIORef (pullValue p) $ Just subscribed
686− askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some.This (BehaviorSubscribedPull subscribed)) :))
685+ askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some (BehaviorSubscribedPull subscribed)) :))
687686 return a
688687
689688behaviorDyn :: Patch p => Dyn x p -> Behavior x (PatchTarget p)
@@ -694,7 +693,7 @@ readHoldTracked :: Hold x p -> BehaviorM x (PatchTarget p)
694693readHoldTracked h = do
695694 result <- liftIO $ readIORef $ holdValue h
696695 askInvalidator >>= mapM_ (\wi -> liftIO $ modifyIORef' (holdInvalidators h) (wi:))
697− askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some.This (BehaviorSubscribedHold h)) :))
696+ askParentsRef >>= mapM_ (\r -> liftIO $ modifyIORef' r (SomeBehaviorSubscribed (Some (BehaviorSubscribedHold h)) :))
698697 liftIO $ touch h -- Otherwise, if this gets inlined enough, the hold's parent reference may get collected
699698 return result
700699
@@ -867,7 +866,7 @@ instance HasSpiderTimeline x => Defer (Some Clear) (EventM x) where
867866
868867{-# INLINE scheduleClear #-}
869868scheduleClear :: Defer (Some Clear) m => IORef (Maybe a) -> m ()
870−scheduleClear r = defer $ Some.This $ Clear r
869+scheduleClear r = defer $ Some $ Clear r
871870
872871instance HasSpiderTimeline x => Defer (Some IntClear) (EventM x) where
873872 {-# INLINE getDeferralQueue #-}
@@ -875,7 +874,7 @@ instance HasSpiderTimeline x => Defer (Some IntClear) (EventM x) where
875874
876875{-# INLINE scheduleIntClear #-}
877876scheduleIntClear :: Defer (Some IntClear) m => IORef (IntMap a) -> m ()
878−scheduleIntClear r = defer $ Some.This $ IntClear r
877+scheduleIntClear r = defer $ Some $ IntClear r
879878
880879instance HasSpiderTimeline x => Defer (Some RootClear) (EventM x) where
881880 {-# INLINE getDeferralQueue #-}
@@ -883,7 +882,7 @@ instance HasSpiderTimeline x => Defer (Some RootClear) (EventM x) where
883882
884883{-# INLINE scheduleRootClear #-}
885884scheduleRootClear :: Defer (Some RootClear) m => IORef (DMap k Identity) -> m ()
886−scheduleRootClear r = defer $ Some.This $ RootClear r
885+scheduleRootClear r = defer $ Some $ RootClear r
887886
888887instance HasSpiderTimeline x => Defer (SomeResetCoincidence x) (EventM x) where
889888 {-# INLINE getDeferralQueue #-}
@@ -1872,7 +1871,7 @@ mergeSubscriber m getKey = Subscriber
18721871 else liftIO $ do
18731872#ifdef DEBUG_CYCLES
18741873 nodesInvolvedInCycle <- walkInvalidHeightParents $ eventSubscribedMerge subscribed
1875− stacks <- forM nodesInvolvedInCycle $ \(Some.This es) -> whoCreatedEventSubscribed es
1874+ stacks <- forM nodesInvolvedInCycle $ \(Some es) -> whoCreatedEventSubscribed es
18761875 let cycleInfo = ":\n" <> drawForest (listsToForest stacks)
18771876#else
18781877 let cycleInfo = ""
@@ -2116,11 +2115,11 @@ runFrame a = SpiderHost $ do
21162115 return result
21172116 result <- runEventM go
21182117 toClear <- readIORef $ eventEnvClears env
2119− forM_ toClear $ \(Some.This (Clear ref)) -> {-# SCC "clear" #-} writeIORef ref Nothing
2118+ forM_ toClear $ \(Some (Clear ref)) -> {-# SCC "clear" #-} writeIORef ref Nothing
21202119 toClearInt <- readIORef $ eventEnvIntClears env
2121− forM_ toClearInt $ \(Some.This (IntClear ref)) -> {-# SCC "intClear" #-} writeIORef ref $! IntMap.empty
2120+ forM_ toClearInt $ \(Some (IntClear ref)) -> {-# SCC "intClear" #-} writeIORef ref $! IntMap.empty
21222121 toClearRoot <- readIORef $ eventEnvRootClears env
2123− forM_ toClearRoot $ \(Some.This (RootClear ref)) -> {-# SCC "rootClear" #-} writeIORef ref $! DMap.empty
2122+ forM_ toClearRoot $ \(Some (RootClear ref)) -> {-# SCC "rootClear" #-} writeIORef ref $! DMap.empty
21242123 toAssign <- readIORef $ eventEnvAssignments env
21252124 toReconnectRef <- newIORef []
21262125 coincidenceInfos <- readIORef $ eventEnvResetCoincidences env
@@ -2480,7 +2479,7 @@ unsafeNewSpiderTimelineEnv = do
24802479
24812480-- | Create a new SpiderTimelineEnv
24822481newSpiderTimeline :: IO (Some SpiderTimelineEnv)
2483−newSpiderTimeline = withSpiderTimeline (pure . Some.This)
2482+newSpiderTimeline = withSpiderTimeline (pure . Some)
24842483
24852484data LocalSpiderTimeline (x :: Type) s
24862485