File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import Reflex.PerformEvent.Class
3131import Reflex.Requester.Base
3232import Reflex.Requester.Class
3333
34- import Control.Lens
3534import Control.Monad.Catch (MonadMask , MonadThrow , MonadCatch )
3635import Control.Monad.Exception
3736import Control.Monad.Fix
Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff line change 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
2525import Control.Concurrent
2626import qualified Control.Concurrent.Thread.Delay as Concurrent
27- import Control.Lens hiding ((|>) )
2827import Control.Monad
2928import Control.Monad.Fix
3029import 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 #-}
You can’t perform that action at this time.
0 commit comments