@@ -82,6 +82,12 @@ import Language.Javascript.JSaddle (JSM, Results, Batch)
8282import Language.Javascript.JSaddle.Run (runJavaScript)
8383import Language.Javascript.JSaddle.Run.Files (initState, runBatch, ghcjsHelpers)
8484
85+noAdjustment :: Maybe Adjustment
86+noAdjustment = Nothing
87+
88+noCancellable :: Maybe Cancellable
89+noCancellable = Nothing
90+
8591quitWebView :: WebView -> IO ()
8692quitWebView wv = postGUIAsync $ do w <- widgetGetToplevel wv --TODO: Shouldn't this be postGUISync?
8793 widgetDestroy w
@@ -104,7 +110,7 @@ run main = do
104110 _ <- timeoutAdd PRIORITY_HIGH 10 (yield >> return True)
105111 windowSetDefaultSize window 900 600
106112 windowSetPosition window WindowPositionCenter
107− scrollWin <- scrolledWindowNew (Nothing :: Maybe Adjustment) (Nothing :: Maybe Adjustment)
113+ scrollWin <- scrolledWindowNew noAdjustment noAdjustment
108114 contentManager <- userContentManagerNew
109115 webView <- webViewNewWithUserContentManager contentManager
110116 settings <- webViewGetSettings webView
@@ -128,11 +134,11 @@ run main = do
128134runInWebView :: JSM () -> WebView -> IO ()
129135runInWebView f webView = do
130136 (processResults, syncResults, start) <- runJavaScript (\batch -> postGUIAsync $
131− webViewRunJavascript webView (decodeUtf8 . toStrict $ "runJSaddleBatch(" <> encode batch <> ");") (Nothing :: Maybe Cancellable) Nothing)
137+ webViewRunJavascript webView (decodeUtf8 . toStrict $ "runJSaddleBatch(" <> encode batch <> ");") noCancellable Nothing)
132138 f
133139
134140 addJSaddleHandler webView processResults syncResults
135− webViewRunJavascript webView (decodeUtf8 $ toStrict jsaddleJs) (Nothing :: Maybe Cancellable) . Just $
141+ webViewRunJavascript webView (decodeUtf8 $ toStrict jsaddleJs) noCancellable . Just $
136142 \_obj _asyncResult ->
137143 void $ forkIO start
138144