on develop help sign in
Merge pull request #221 from reflex-frp/instances-ProfiledM
7180ebfRyan Trinkle
src/Reflex/Profiled.hs+3−1
@@ -12,6 +12,7 @@ module Reflex.Profiled where
12
12
13import Control.Lens hiding (children)
13import Control.Lens hiding (children)
14import Control.Monad
14import Control.Monad
15+import Control.Monad.Exception
15import Control.Monad.Fix
16import Control.Monad.Fix
16import Control.Monad.Primitive
17import Control.Monad.Primitive
17import Control.Monad.Reader
18import Control.Monad.Reader
@@ -101,7 +102,8 @@ writeProfilingData :: FilePath -> IO ()
101writeProfilingData p = do
102writeProfilingData p = do
102 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
103 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
103
104
104−newtype ProfiledM m a = ProfiledM { runProfiledM :: m a } deriving (Functor, Applicative, Monad, MonadFix)
105+newtype ProfiledM m a = ProfiledM { runProfiledM :: m a }
106+ deriving (Functor, Applicative, Monad, MonadFix, MonadException, MonadAsyncException)
105
107
106profileEvent :: Reflex t => Event t a -> Event t a
108profileEvent :: Reflex t => Event t a -> Event t a
107profileEvent e = unsafePerformIO $ do
109profileEvent e = unsafePerformIO $ do
src/Reflex/Spider/Internal.hs+2−1
@@ -2576,7 +2576,8 @@ runSpiderHost (SpiderHost a) = runReaderT a globalSpiderTimelineEnv
2576runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
2576runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
2577runSpiderHostForTimeline (SpiderHost a) = runReaderT a
2577runSpiderHostForTimeline (SpiderHost a) = runReaderT a
2578
2578
2579+newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a }
2579−newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a } deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2580+ deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2580
2581
2581instance Monad (SpiderHostFrame x) where
2582instance Monad (SpiderHostFrame x) where
2582 {-# INLINABLE (>>=) #-}
2583 {-# INLINABLE (>>=) #-}