on develop help sign in
Derive more newtype instances for ProfiledM
d49708dJohn Ericson
src/Reflex/Profiled.hs+3−1
@@ -11,6 +11,7 @@ module Reflex.Profiled where
11
11
12import Control.Lens hiding (children)
12import Control.Lens hiding (children)
13import Control.Monad
13import Control.Monad
14+import Control.Monad.Exception
14import Control.Monad.Fix
15import Control.Monad.Fix
15import Control.Monad.Primitive
16import Control.Monad.Primitive
16import Control.Monad.Reader
17import Control.Monad.Reader
@@ -95,7 +96,8 @@ writeProfilingData :: FilePath -> IO ()
95writeProfilingData p = do
96writeProfilingData p = do
96 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
97 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
97
98
98−newtype ProfiledM m a = ProfiledM { runProfiledM :: m a } deriving (Functor, Applicative, Monad, MonadFix)
99+newtype ProfiledM m a = ProfiledM { runProfiledM :: m a }
100+ deriving (Functor, Applicative, Monad, MonadFix, MonadException, MonadAsyncException)
99
101
100profileEvent :: Reflex t => Event t a -> Event t a
102profileEvent :: Reflex t => Event t a -> Event t a
101profileEvent e = unsafePerformIO $ do
103profileEvent e = unsafePerformIO $ do
src/Reflex/Spider/Internal.hs+2−1
@@ -2408,7 +2408,8 @@ runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
2408runSpiderHostForTimeline (SpiderHost a) = runReaderT a
2408runSpiderHostForTimeline (SpiderHost a) = runReaderT a
2409#endif
2409#endif
2410
2410
2411+newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a }
2411−newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a } deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2412+ deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2412
2413
2413instance Monad (SpiderHostFrame x) where
2414instance Monad (SpiderHostFrame x) where
2414 {-# INLINABLE (>>=) #-}
2415 {-# INLINABLE (>>=) #-}