Skip to content

Commit e5d5946

Browse files
Merge branch 'develop' into canhazmerge
2 parents 5feea42 + bccbe42 commit e5d5946

File tree

9 files changed

+55
-61
lines changed

9 files changed

+55
-61
lines changed

ChangeLog.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}:
1212
mkDerivation {
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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: reflex
2-
Version: 0.6.1
2+
Version: 0.6.2.0
33
Synopsis: Higher-order Functional Reactive Programming
44
Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
55
License: 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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ import Data.IntMap (IntMap)
5252
import qualified Data.IntMap as IntMap
5353
import Data.Map (Map)
5454
import qualified Data.Map as Map
55-
import Data.Some (Some)
56-
import qualified Data.Some as Some
55+
import Data.Some (Some(Some))
5756
import Data.These
5857
import Data.Typeable hiding (Refl)
5958

@@ -79,9 +78,6 @@ deriving instance Read k => Read (Const2 k v v)
7978
instance 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-
8581
instance 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'
126122
weakenDMapWith :: (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'.
223214
eitherToDSum :: Either a b -> DSum (EitherTag a b) Identity
224215
eitherToDSum = \case

src/Reflex/Class.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ import qualified Data.IntMap.Strict as IntMap
198198
import Data.List.NonEmpty (NonEmpty (..))
199199
import Data.Map (Map)
200200
import Data.Semigroup (Semigroup, sconcat, stimes, (<>))
201-
import Data.Some (Some)
202-
import qualified Data.Some as Some
201+
import Data.Some (Some(Some))
203202
import Data.String
204203
import Data.These
205204
import 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))))
11781177
factorEvent 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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import Reflex.Patch.Class
1919
import Reflex.Patch.MapWithMove (PatchMapWithMove (..))
2020
import qualified Reflex.Patch.MapWithMove as MapWithMove
2121

22+
import Data.Constraint.Extras
2223
import Data.Dependent.Map (DMap, DSum (..), GCompare (..))
2324
import qualified Data.Dependent.Map as DMap
24-
import Data.Dependent.Sum (EqTag (..))
2525
import Data.Functor.Constant
2626
import Data.Functor.Misc
2727
import Data.Functor.Product
@@ -30,8 +30,7 @@ import Data.GADT.Show (GShow, gshow)
3030
import qualified Data.Map as Map
3131
import Data.Maybe
3232
import Data.Semigroup (Semigroup (..), (<>))
33-
import Data.Some (Some)
34-
import qualified Data.Some as Some
33+
import Data.Some (Some(Some))
3534
import 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
112111
data 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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ import Data.Map (Map)
3838
import qualified Data.Map as Map
3939
import Data.Monoid ((<>))
4040
import qualified Data.Semigroup as S
41-
import Data.Some (Some)
42-
import qualified Data.Some as Some
41+
import Data.Some (Some(Some))
4342
import Data.These
4443

4544
import 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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ import qualified Data.Map as Map
6666
import Data.Monoid ((<>))
6767
import Data.Proxy
6868
import qualified Data.Semigroup as S
69-
import Data.Some (Some)
70-
import qualified Data.Some as Some
69+
import Data.Some (Some(Some))
7170
import Data.Type.Equality
7271
import 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

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ import Data.Tree (Forest, Tree (..), drawForest)
7878
import Data.FastWeakBag (FastWeakBag)
7979
import qualified Data.FastWeakBag as FastWeakBag
8080
import Data.Reflection
81-
import Data.Some (Some)
82-
import qualified Data.Some as Some
81+
import Data.Some (Some(Some))
8382
import Data.Type.Coercion
8483
import Data.Profunctor.Unsafe ((#.), (.#))
8584
import 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

631630
walkInvalidHeightParents :: EventSubscribed x -> IO [Some (EventSubscribed x)]
632631
walkInvalidHeightParents 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

689688
behaviorDyn :: Patch p => Dyn x p -> Behavior x (PatchTarget p)
@@ -694,7 +693,7 @@ readHoldTracked :: Hold x p -> BehaviorM x (PatchTarget p)
694693
readHoldTracked 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,23 +866,23 @@ instance HasSpiderTimeline x => Defer (Some Clear) (EventM x) where
867866

868867
{-# INLINE scheduleClear #-}
869868
scheduleClear :: Defer (Some Clear) m => IORef (Maybe a) -> m ()
870-
scheduleClear r = defer $ Some.This $ Clear r
869+
scheduleClear r = defer $ Some $ Clear r
871870

872871
instance HasSpiderTimeline x => Defer (Some IntClear) (EventM x) where
873872
{-# INLINE getDeferralQueue #-}
874873
getDeferralQueue = asksEventEnv eventEnvIntClears
875874

876875
{-# INLINE scheduleIntClear #-}
877876
scheduleIntClear :: Defer (Some IntClear) m => IORef (IntMap a) -> m ()
878-
scheduleIntClear r = defer $ Some.This $ IntClear r
877+
scheduleIntClear r = defer $ Some $ IntClear r
879878

880879
instance HasSpiderTimeline x => Defer (Some RootClear) (EventM x) where
881880
{-# INLINE getDeferralQueue #-}
882881
getDeferralQueue = asksEventEnv eventEnvRootClears
883882

884883
{-# INLINE scheduleRootClear #-}
885884
scheduleRootClear :: 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

888887
instance 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
24822481
newSpiderTimeline :: IO (Some SpiderTimelineEnv)
2483-
newSpiderTimeline = withSpiderTimeline (pure . Some.This)
2482+
newSpiderTimeline = withSpiderTimeline (pure . Some)
24842483

24852484
data LocalSpiderTimeline (x :: Type) s
24862485

0 commit comments

Comments
 (0)