@@ -48,13 +48,14 @@ import GI.WebKit.Objects.WebFrame
48 (webFrameGetGlobalContext)
48 (webFrameGetGlobalContext)
49import GI.GLib (idleAdd)
49import GI.GLib (idleAdd)
50import GI.GLib.Constants(pattern PRIORITY_DEFAULT)
50import GI.GLib.Constants(pattern PRIORITY_DEFAULT)
52−import qualified Control.Exception as E (Exception, catch, bracket)
53−import Control.Concurrent.MVar (takeMVar, putMVar, newEmptyMVar)
54import Foreign.Ptr (castPtr)
51import Foreign.Ptr (castPtr)
55import GI.JavaScriptCore.Structs.GlobalContext (GlobalContext(..))
52import GI.JavaScriptCore.Structs.GlobalContext (GlobalContext(..))
56import Foreign.ForeignPtr (withForeignPtr)
53import Foreign.ForeignPtr (withForeignPtr)
55+import qualified Control.Exception as E (Exception, catch, bracket)
56+import Control.Concurrent.MVar (takeMVar, putMVar, newEmptyMVar)
58-- | Post an action to be run in the main GUI thread.
59-- | Post an action to be run in the main GUI thread.
60-- The current thread blocks until the action completes and the result is
61-- The current thread blocks until the action completes and the result is
@@ -75,6 +76,7 @@ postGUIAsync :: IO () -> IO ()
75postGUIAsync action = do
76postGUIAsync action = do
76 idleAdd PRIORITY_DEFAULT $ action >> return False
77 idleAdd PRIORITY_DEFAULT $ action >> return False
79-- | Wrapped version of 'E.catch' that runs in a MonadIO that works
81-- | Wrapped version of 'E.catch' that runs in a MonadIO that works
80-- a bit better with 'JSM'
82-- a bit better with 'JSM'