on develop help sign in
Merge pull request #221 from reflex-frp/instances-ProfiledM

Derive more newtype instances for ProfiledM

commit7180ebfe283d973c5abc5ac851904f488c579a0f authorRyan Trinkle <ryan.trinkle@gmail.com> dateThu 20 Sep 2018, 16:02 (8 years ago) parentf4db125d49708d
2 files changed+5−2
src/Reflex/Profiled.hs+3−1 src/Reflex/Spider/Internal.hs+2−1
src/Reflex/Profiled.hs+3−1
@@ -12,6 +12,7 @@ module Reflex.Profiled where
1212
1313import Control.Lens hiding (children)
1414import Control.Monad
15+import Control.Monad.Exception
1516import Control.Monad.Fix
1617import Control.Monad.Primitive
1718import Control.Monad.Reader
@@ -101,7 +102,8 @@ writeProfilingData :: FilePath -> IO ()
101102writeProfilingData p = do
102103 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
103104
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)
105107
106108profileEvent :: Reflex t => Event t a -> Event t a
107109profileEvent e = unsafePerformIO $ do
src/Reflex/Spider/Internal.hs+2−1
@@ -2576,7 +2576,8 @@ runSpiderHost (SpiderHost a) = runReaderT a globalSpiderTimelineEnv
25762576runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
25772577runSpiderHostForTimeline (SpiderHost a) = runReaderT a
25782578
2579−newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a } deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2579+newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a }
2580+ deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
25802581
25812582instance Monad (SpiderHostFrame x) where
25822583 {-# INLINABLE (>>=) #-}