Skip to content

Commit 3785bc0

Browse files
committed
Make RequesterT tests build again
1 parent e50e615 commit 3785bc0

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

reflex.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,16 @@ test-suite RequesterT
233233
main-is: RequesterT.hs
234234
hs-source-dirs: test
235235
build-depends: base
236+
, containers
237+
, deepseq >= 1.3 && < 1.5
236238
, dependent-sum
237239
, dependent-map
238240
, lens
241+
, mtl
239242
, these
240243
, transformers
241244
, reflex
242245
, ref-tf
243-
buildable: False
244246
other-modules:
245247
Reflex.TestPlan
246248
Reflex.Plan.Pure

test/RequesterT.hs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE BangPatterns #-}
12
{-# LANGUAGE FlexibleContexts #-}
23
{-# LANGUAGE GADTs #-}
34
{-# LANGUAGE RankNTypes #-}
@@ -20,18 +21,19 @@ data RequestInt a where
2021

2122
main :: IO ()
2223
main = do
23-
os1@[[Just [10,9,8,7,6,5,4,3,2,1]]] <- runApp' (unwrapApp testOrdering) $
24+
os1 <- runApp' (unwrapApp testOrdering) $
2425
[ Just ()
2526
]
2627
print os1
27-
os2@[[Just [1,3,5,7,9]],[Nothing,Nothing],[Just [2,4,6,8,10]],[Just [2,4,6,8,10],Nothing]]
28-
<- runApp' (unwrapApp testSimultaneous) $ map Just $
29-
[ This ()
30-
, That ()
31-
, This ()
32-
, These () ()
33-
]
28+
let ![[Just [10,9,8,7,6,5,4,3,2,1]]] = os1
29+
os2 <- runApp' (unwrapApp testSimultaneous) $ map Just $
30+
[ This ()
31+
, That ()
32+
, This ()
33+
, These () ()
34+
]
3435
print os2
36+
let ![[Just [1,3,5,7,9]],[Nothing,Nothing],[Just [2,4,6,8,10]],[Just [2,4,6,8,10],Nothing]] = os2
3537
return ()
3638

3739
unwrapRequest :: DSum tag RequestInt -> Int
@@ -43,7 +45,7 @@ unwrapApp :: ( Reflex t, Monad m )
4345
-> m (Event t [Int])
4446
unwrapApp x appIn = do
4547
((), e) <- runRequesterT (x appIn) never
46-
return $ fmap (map unwrapRequest . DMap.toList) e
48+
return $ fmap (map unwrapRequest . requesterDataToList) e
4749

4850
testOrdering :: ( Response m ~ Identity
4951
, Request m ~ RequestInt

0 commit comments

Comments
 (0)