Skip to content

Commit 6c66bb3

Browse files
authored
Merge branch 'develop' into unconditional-th
2 parents 36abb23 + e3914ee commit 6c66bb3

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

reflex.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ library
7878
dependent-sum >= 0.6 && < 0.8,
7979
exceptions >= 0.10 && < 0.11,
8080
exception-transformers >= 0.4 && < 0.5,
81-
lens >= 4.7 && < 5.4,
8281
mmorph >= 1.0 && < 1.3,
8382
monad-control >= 1.0.1 && < 1.1,
8483
mtl >= 2.1 && < 2.4,

src/Reflex/PerformEvent/Base.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import Reflex.PerformEvent.Class
3131
import Reflex.Requester.Base
3232
import Reflex.Requester.Class
3333

34-
import Control.Lens
3534
import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch)
3635
import Control.Monad.Exception
3736
import Control.Monad.Fix

src/Reflex/Requester/Class.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class (Reflex t, Monad m) => Requester t m | m -> t where
4040
type Response m :: Type -> Type
4141
-- | Emit a request whenever the given 'Event' fires, and return responses in
4242
-- the resulting 'Event'.
43+
--
44+
-- Semantically, the response event occurs at a later time than the request event.
4345
requesting :: Event t (Request m a) -> m (Event t (Response m a))
4446
-- | Emit a request whenever the given 'Event' fires, and ignore all responses.
4547
requesting_ :: Event t (Request m a) -> m ()

src/Reflex/Time.hs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{-# LANGUAGE ScopedTypeVariables #-}
99
{-# LANGUAGE TupleSections #-}
1010
{-# LANGUAGE TypeFamilies #-}
11-
{-# LANGUAGE TemplateHaskell #-}
11+
1212
-- |
1313
-- Module:
1414
-- Reflex.Time
@@ -24,7 +24,6 @@ import Reflex.TriggerEvent.Class
2424

2525
import Control.Concurrent
2626
import qualified Control.Concurrent.Thread.Delay as Concurrent
27-
import Control.Lens hiding ((|>))
2827
import Control.Monad
2928
import Control.Monad.Fix
3029
import Control.Monad.IO.Class
@@ -363,4 +362,14 @@ throttleBatchWithLag lag e = do
363362
delayed <- lag (void outE)
364363
return outE
365364

366-
makeLensesWith (lensRules & simpleLenses .~ True) ''TickInfo
365+
tickInfo_lastUTC :: Functor f => (UTCTime -> f UTCTime) -> TickInfo -> f TickInfo
366+
tickInfo_lastUTC f (TickInfo x1 x2 x3) = (\y -> TickInfo y x2 x3) <$> f x1
367+
{-# INLINE tickInfo_lastUTC #-}
368+
369+
tickInfo_n :: Functor f => (Integer -> f Integer ) -> TickInfo -> f TickInfo
370+
tickInfo_n f (TickInfo x1 x2 x3) = (\y -> TickInfo x1 y x3) <$> f x2
371+
{-# INLINE tickInfo_n #-}
372+
373+
tickInfo_alreadyElapsed :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> TickInfo -> f TickInfo
374+
tickInfo_alreadyElapsed f (TickInfo x1 x2 x3) = TickInfo x1 x2 <$> f x3
375+
{-# INLINE tickInfo_alreadyElapsed #-}

0 commit comments

Comments
 (0)