on develop help sign in
Replace 'onceE' with 'headE' in Reflex.Test.CrossImpl
commitc37900b833ba63832bb36d52c7bdc267e8d82eed authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 16 Apr 2017, 01:29 (10 years ago) parentc686c75
1 file changed+7−7
test/Reflex/Test/CrossImpl.hs+7−7
test/Reflex/Test/CrossImpl.hs+7−7
@@ -130,8 +130,8 @@ testCases =
130130 e' <- updated <$> count e
131131 b' <- hold (0 :: Int) e'
132132 return (b', e')
133− , (,) "onceE-1" $ TestCase (Map.singleton 0 "asdf", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
134− e' <- onceE $ leftmost [e, e]
133+ , (,) "headE-1" $ TestCase (Map.singleton 0 "asdf", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
134+ e' <- headE $ leftmost [e, e]
135135 return (b, e')
136136 , (,) "switch-1" $ TestCase (Map.singleton 0 "asdf", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
137137 let e' = fmap (const e) e
@@ -176,7 +176,7 @@ testCases =
176176 return (b, e'')
177177 , (,) "switchPromptly-5" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
178178 let e' = flip push e $ \_ -> do
179− Just <$> onceE e
179+ Just <$> headE e
180180 e'' <- switchPromptly never e'
181181 return (b, e'')
182182 , (,) "switchPromptly-6" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
@@ -197,7 +197,7 @@ testCases =
197197 e'' = coincidence e'
198198 return (b, e'')
199199 , (,) "coincidence-4" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj"), (3, "asdf")]) $ \(b, e) -> do
200− let e' = flip pushAlways e $ \_ -> onceE e
200+ let e' = flip pushAlways e $ \_ -> headE e
201201 e'' = coincidence e'
202202 return (b, e'')
203203 , (,) "coincidence-5" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer")]) $ \(b, e) -> do
@@ -217,14 +217,14 @@ testCases =
217217 eCoincidences = coincidence $ fmap (const e') e
218218 return (b, eCoincidences)
219219 , (,) "holdWhileFiring" $ TestCase (Map.singleton 0 "zxc", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
220− eo <- onceE e
220+ eo <- headE e
221221 bb <- hold b $ pushAlways (const $ hold "asdf" eo) eo
222222 let b' = pull $ sample =<< sample bb
223223 return (b', e)
224224 , (,) "joinDyn" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
225225 bb <- hold "b" e
226− bd <- hold never . fmap (const e) =<< onceE e
227− eOuter <- pushAlways sample . fmap (const bb) <$> onceE e
226+ bd <- hold never . fmap (const e) =<< headE e
227+ eOuter <- pushAlways sample . fmap (const bb) <$> headE e
228228 let eInner = switch bd
229229 e' = leftmost [eOuter, eInner]
230230 return (b, e')