@@ -130,13 +130,13 @@ fromJSBoolMaybe :: JSContextRef -> JSValueRef -> IO (Maybe Bool)
130fromJSBoolMaybe c t = do
130fromJSBoolMaybe c t = do
131 isBool <- jsvalueisboolean c t
131 isBool <- jsvalueisboolean c t
132 if not isBool then return Nothing else
132 if not isBool then return Nothing else
133− fmap Just $ jsvaluetoboolean c t
133+ Just <$> jsvaluetoboolean c t
135fromJSNumMaybe :: JSContextRef -> JSValueRef -> IO (Maybe Double)
135fromJSNumMaybe :: JSContextRef -> JSValueRef -> IO (Maybe Double)
136fromJSNumMaybe c t = do
136fromJSNumMaybe c t = do
137 isNum <- jsvalueisnumber c t
137 isNum <- jsvalueisnumber c t
138 if not isNum then return Nothing else
138 if not isNum then return Nothing else
139− fmap Just $ jsvaluetonumber c t nullPtr
139+ Just <$> jsvaluetonumber c t nullPtr
141getLocationHost :: WebView -> IO Text
141getLocationHost :: WebView -> IO Text
142getLocationHost wv = withWebViewContext wv $ \c -> do
142getLocationHost wv = withWebViewContext wv $ \c -> do