@@ -11,6 +11,7 @@ module Reflex.Profiled where
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
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)
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