on develop help sign in
merge with TickInfo derived classes
d6f452bGreg Hale
src-ghc/Reflex/Dom/Internal/Foreign.hs−1
@@ -35,7 +35,6 @@ makeDefaultWebView userAgentKey main = do
35 main webView
35 main webView
36 wf <- webViewGetMainFrame webView
36 wf <- webViewGetMainFrame webView
37 webFrameLoadString wf "" Nothing "file:///"
37 webFrameLoadString wf "" Nothing "file:///"
38− main webView
39 mainGUI
38 mainGUI
40
39
41runWebGUI :: (WebView -> IO ()) -> IO ()
40runWebGUI :: (WebView -> IO ()) -> IO ()
src/Reflex/Dom/Time.hs+2−1
@@ -12,6 +12,7 @@ import Control.Monad.IO.Class
12import Data.Fixed
12import Data.Fixed
13import Data.Time.Clock
13import Data.Time.Clock
14import System.Random
14import System.Random
15+import Data.Typeable
15
16
16data TickInfo
17data TickInfo
17 = TickInfo { _tickInfo_lastUTC :: UTCTime
18 = TickInfo { _tickInfo_lastUTC :: UTCTime
@@ -21,7 +22,7 @@ data TickInfo
21 , _tickInfo_alreadyElapsed :: NominalDiffTime
22 , _tickInfo_alreadyElapsed :: NominalDiffTime
22 -- ^ Amount of time already elapsed in the current tick period.
23 -- ^ Amount of time already elapsed in the current tick period.
23 }
24 }
24− deriving (Eq, Show)
25+ deriving (Eq, Ord, Show, Typeable)
25
26
26-- | Special case of tickLossyFrom that uses the post-build event to start the
27-- | Special case of tickLossyFrom that uses the post-build event to start the
27-- tick thread.
28-- tick thread.
src/Reflex/Dom/Xhr.hs+4
@@ -31,12 +31,14 @@ import Data.Traversable
31import Reflex
31import Reflex
32import Reflex.Dom.Class
32import Reflex.Dom.Class
33import Reflex.Dom.Xhr.Foreign
33import Reflex.Dom.Xhr.Foreign
34+import Data.Typeable
34
35
35data XhrRequest
36data XhrRequest
36 = XhrRequest { _xhrRequest_method :: String
37 = XhrRequest { _xhrRequest_method :: String
37 , _xhrRequest_url :: String
38 , _xhrRequest_url :: String
38 , _xhrRequest_config :: XhrRequestConfig
39 , _xhrRequest_config :: XhrRequestConfig
39 }
40 }
41+ deriving (Show, Read, Eq, Ord, Typeable)
40
42
41data XhrRequestConfig
43data XhrRequestConfig
42 = XhrRequestConfig { _xhrRequestConfig_headers :: Map String String
44 = XhrRequestConfig { _xhrRequestConfig_headers :: Map String String
@@ -45,10 +47,12 @@ data XhrRequestConfig
45 , _xhrRequestConfig_responseType :: Maybe String
47 , _xhrRequestConfig_responseType :: Maybe String
46 , _xhrRequestConfig_sendData :: Maybe String
48 , _xhrRequestConfig_sendData :: Maybe String
47 }
49 }
50+ deriving (Show, Read, Eq, Ord, Typeable)
48
51
49data XhrResponse
52data XhrResponse
50 = XhrResponse { _xhrResponse_body :: Maybe Text
53 = XhrResponse { _xhrResponse_body :: Maybe Text
51 }
54 }
55+ deriving (Show, Read, Eq, Ord, Typeable)
52
56
53instance Default XhrRequestConfig where
57instance Default XhrRequestConfig where
54 def = XhrRequestConfig { _xhrRequestConfig_headers = Map.empty
58 def = XhrRequestConfig { _xhrRequestConfig_headers = Map.empty