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