@@ -1555,13 +1555,13 @@ instance (Adjustable t m, MonadJSM m, MonadHold t m, MonadFix m, PrimMonad m, Ra
15551555 readIORef (_traverseChildImmediate_childReadyState immediate) >>= \case
15561556 ChildReadyState_Ready -> return PatchDMapWithMove.From_Delete
15571557 ChildReadyState_Unready _ -> do
1558− writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ This k
1558+ writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ Some k
15591559 return $ PatchDMapWithMove.From_Insert $ Constant (_traverseChildImmediate_childReadyState immediate)
15601560 PatchDMapWithMove.From_Delete -> return PatchDMapWithMove.From_Delete
15611561 PatchDMapWithMove.From_Move fromKey -> return $ PatchDMapWithMove.From_Move fromKey
15621562 deleteOrMove :: forall a. k a -> Product (Constant (IORef (ChildReadyState (Some k)))) (ComposeMaybe k) a -> IO (Constant () a)
15631563 deleteOrMove _ (Pair (Constant sRef) (ComposeMaybe mToKey)) = do
1564− writeIORef sRef $ ChildReadyState_Unready $ This <$> mToKey -- This will be Nothing if deleting, and Just if moving, so it works out in both cases
1564+ writeIORef sRef $ ChildReadyState_Unready $ Some <$> mToKey -- This will be Nothing if deleting, and Just if moving, so it works out in both cases
15651565 return $ Constant ()
15661566 p' <- fmap unsafePatchDMapWithMove $ DMap.traverseWithKey new $ unPatchDMapWithMove p
15671567 _ <- DMap.traverseWithKey deleteOrMove $ PatchDMapWithMove.getDeletionsAndMoves p old
@@ -1571,8 +1571,8 @@ instance (Adjustable t m, MonadJSM m, MonadHold t m, MonadFix m, PrimMonad m, Ra
15711571 phsBefore <- liftIO $ readIORef placeholders
15721572 let collectIfMoved :: forall a. k a -> PatchDMapWithMove.NodeInfo k (Compose (TraverseChild t m (Some k)) v') a -> JSM (Constant (Maybe DOM.DocumentFragment) a)
15731573 collectIfMoved k e = do
1574− let mThisPlaceholder = Map.lookup (This k) phsBefore -- Will be Nothing if this element wasn't present before
1575− nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (This k) phsBefore
1574+ let mThisPlaceholder = Map.lookup (Some k) phsBefore -- Will be Nothing if this element wasn't present before
1575+ nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (Some k) phsBefore
15761576 case isJust $ getComposeMaybe $ PatchDMapWithMove._nodeInfo_to e of
15771577 False -> do
15781578 mapM_ (`deleteUpTo` nextPlaceholder) mThisPlaceholder
@@ -1591,7 +1591,7 @@ instance (Adjustable t m, MonadJSM m, MonadHold t m, MonadFix m, PrimMonad m, Ra
15911591 PatchMapWithMove.From_Move k -> Just $ PatchMapWithMove.From_Move k
15921592 let placeFragment :: forall a. k a -> PatchDMapWithMove.NodeInfo k (Compose (TraverseChild t m (Some k)) v') a -> JSM (Constant () a)
15931593 placeFragment k e = do
1594− let nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (This k) phsAfter
1594+ let nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (Some k) phsAfter
15951595 case PatchDMapWithMove._nodeInfo_from e of
15961596 PatchDMapWithMove.From_Insert (Compose (TraverseChild x _)) -> case x of
15971597 Left _ -> pure ()
@@ -1622,7 +1622,7 @@ traverseDMapWithKeyWithAdjust' = do
16221622 readIORef (_traverseChildImmediate_childReadyState immediate) >>= \case
16231623 ChildReadyState_Ready -> return Nothing -- Delete this child, since it's ready
16241624 ChildReadyState_Unready _ -> do
1625− writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ This k
1625+ writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ Some k
16261626 return $ Just $ Constant (_traverseChildImmediate_childReadyState immediate)
16271627 delete _ (Constant sRef) = do
16281628 writeIORef sRef $ ChildReadyState_Unready Nothing
@@ -1633,9 +1633,9 @@ traverseDMapWithKeyWithAdjust' = do
16331633 hoistTraverseWithKeyWithAdjust traverseDMapWithKeyWithAdjust mapPatchDMap updateChildUnreadiness $ \placeholders lastPlaceholder (PatchDMap patch) -> do
16341634 phs <- liftIO $ readIORef placeholders
16351635 forM_ (DMap.toList patch) $ \(k :=> ComposeMaybe mv) -> do
1636− let nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (This k) phs
1636+ let nextPlaceholder = maybe lastPlaceholder snd $ Map.lookupGT (Some k) phs
16371637 -- Delete old node
1638− forM_ (Map.lookup (This k) phs) $ \thisPlaceholder -> do
1638+ forM_ (Map.lookup (Some k) phs) $ \thisPlaceholder -> do
16391639 thisPlaceholder `deleteUpTo` nextPlaceholder
16401640 -- Insert new node
16411641 forM_ mv $ \(Compose (TraverseChild e _)) -> case e of
@@ -1785,7 +1785,7 @@ hoistTraverseWithKeyWithAdjust base mapPatch updateChildUnreadiness applyDomUpda
17851785 liftIO $ writeIORef childReadyState ChildReadyState_Ready
17861786 case countedAt of
17871787 Nothing -> return ()
1788− Just (This k) -> do -- This child has been counted as unready, so we need to remove it from the unready set
1788+ Just (Some k) -> do -- This child has been counted as unready, so we need to remove it from the unready set
17891789 (oldUnready, p) <- liftIO $ readIORef pendingChange
17901790 when (not $ DMap.null oldUnready) $ do -- This shouldn't actually ever be null
17911791 let newUnready = DMap.delete k oldUnready
@@ -1800,7 +1800,7 @@ hoistTraverseWithKeyWithAdjust base mapPatch updateChildUnreadiness applyDomUpda
18001800 readIORef (_traverseChildImmediate_childReadyState immediate) >>= \case
18011801 ChildReadyState_Ready -> return Nothing
18021802 ChildReadyState_Unready _ -> do
1803− writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ This k
1803+ writeIORef (_traverseChildImmediate_childReadyState immediate) $ ChildReadyState_Unready $ Just $ Some k
18041804 return $ Just $ Constant (_traverseChildImmediate_childReadyState immediate)
18051805 initialUnready <- liftIO $ DMap.mapMaybeWithKey (\_ -> getComposeMaybe) <$> DMap.traverseWithKey processChild children0
18061806 liftIO $ if DMap.null initialUnready