on develop help sign in
Derive more newtype instances for ProfiledM

Put the "deriving" clause on its own line for easier diffing, so we can make sure these don't get out of sync.

commitd49708dba2eabb2635d6f774a30802d9378e1c24 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 17 Aug 2018, 20:03 (8 years ago) parent9f3356f
2 files changed+5−2
src/Reflex/Profiled.hs+3−1 src/Reflex/Spider/Internal.hs+2−1
src/Reflex/Profiled.hs+3−1
@@ -11,6 +11,7 @@ module Reflex.Profiled where
1111
1212import Control.Lens hiding (children)
1313import Control.Monad
14+import Control.Monad.Exception
1415import Control.Monad.Fix
1516import Control.Monad.Primitive
1617import Control.Monad.Reader
@@ -95,7 +96,8 @@ writeProfilingData :: FilePath -> IO ()
9596writeProfilingData p = do
9697 writeFile p =<< formatCostCentreTree =<< getCostCentreTree
9798
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)
99101
100102profileEvent :: Reflex t => Event t a -> Event t a
101103profileEvent e = unsafePerformIO $ do
src/Reflex/Spider/Internal.hs+2−1
@@ -2408,7 +2408,8 @@ runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
24082408runSpiderHostForTimeline (SpiderHost a) = runReaderT a
24092409#endif
24102410
2411−newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a } deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
2411+newtype SpiderHostFrame x a = SpiderHostFrame { runSpiderHostFrame :: EventM x a }
2412+ deriving (Functor, Applicative, MonadFix, MonadIO, MonadException, MonadAsyncException)
24122413
24132414instance Monad (SpiderHostFrame x) where
24142415 {-# INLINABLE (>>=) #-}