on develop help sign in
Get reflex-dom building again

* Upgrade to gtk3 * Bump lens upper version bound * Fix new Xhr function * Fix TickInfo instance and label formatting

commit676933efaf2566024ff20b39689d5063fdf51247 authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 21 Apr 2015, 03:25 (12 years ago) parent003bf93
4 files changed+12−13
default.nix+2−2 reflex-dom.cabal+4−4 src-ghc/Reflex/Dom/Xhr/Foreign.hs+2−3 src/Reflex/Dom/Time.hs+4−4
default.nix+2−2
@@ -1,7 +1,7 @@
11{ mkDerivation, dependent-map, ghcjs-dom, lens
22, mtl, ref-tf, reflex, safe, text, these
33, transformers, data-default, semigroups, aeson
4−, ghc, webkit-javascriptcore
4+, ghc, webkitgtk3-javascriptcore
55}:
66
77mkDerivation {
@@ -22,6 +22,6 @@ mkDerivation {
2222 semigroups
2323 ref-tf
2424 aeson
25− ] ++ (if (ghc.pname or null) == "ghcjs" then [ ] else [ webkit-javascriptcore ]);
25+ ] ++ (if (ghc.pname or null) == "ghcjs" then [ ] else [ webkitgtk3-javascriptcore ]);
2626 license = null;
2727}
reflex-dom.cabal+4−4
@@ -22,7 +22,7 @@ library
2222 transformers >=0.4.2.0 && <0.4.3,
2323 containers >=0.5.6.2 && <0.6,
2424 these >=0.4.2 && <0.5,
25− lens >=4.7 && <4.8,
25+ lens >=4.7 && <4.10,
2626 ghcjs-dom >=0.1.1.3 && <0.2,
2727 safe >=0.3.8 && <0.4,
2828 text >=1.2 && <1.3,
@@ -42,9 +42,9 @@ library
4242 hs-source-dirs: src-ghc
4343 build-depends:
4444 glib >=0.13.0.0 && <0.14,
45− gtk >=0.13.0.0 && <0.14,
46− webkit >=0.13.0.0 && <0.14,
47− webkit-javascriptcore >=0.13.0.4 && <0.14
45+ gtk3 >=0.13.0.0 && <0.14,
46+ webkitgtk3 >=0.13.0.0 && <0.14,
47+ webkitgtk3-javascriptcore >=0.13.0.4 && <0.14
4848
4949 exposed-modules:
5050 Reflex.Dom
src-ghc/Reflex/Dom/Xhr/Foreign.hs+2−3
@@ -145,12 +145,11 @@ xmlHttpRequestGetStatus xhr = do
145145xmlHttpRequestGetStatusText :: XMLHttpRequest -> IO String
146146xmlHttpRequestGetStatusText xhr = do
147147 let c = xhrContext xhr
148− script <- jsstringgetmaximumutf8cstringsize "this.statusText"
148+ script <- jsstringcreatewithutf8cstring "this.statusText"
149149 t <- jsevaluatescript c script (xhrValue xhr) nullPtr 1 nullPtr
150150 j <- jsvaluetostringcopy c t nullPtr
151151 l <- jsstringgetmaximumutf8cstringsize j
152152 s <- allocaBytes (fromIntegral l) $ \ps -> do
153153 _ <- jsstringgetutf8cstring'_ j ps (fromIntegral l)
154154 peekCString ps
155− return $ Just s
156−
155+ return s
src/Reflex/Dom/Time.hs+4−4
@@ -10,14 +10,14 @@ import Data.Fixed
1010import Data.Time.Clock
1111
1212data TickInfo
13− = TickInfo { _tickinfo_lastUTC :: UTCTime
13+ = TickInfo { _tickInfo_lastUTC :: UTCTime
1414 -- ^ UTC time immediately after the last tick.
15− , _tickinfo_n :: Integer
15+ , _tickInfo_n :: Integer
1616 -- ^ Number of time periods since t0
17− , _tickinfo_alreadyElapsed :: NominalDiffTime
17+ , _tickInfo_alreadyElapsed :: NominalDiffTime
1818 -- ^ Amount of time already elapsed in the current tick period.
1919 }
20− deriving (Eq, Show)
20+ deriving (Eq)
2121
2222-- | Special case of tickLossyFrom that uses the post-build event to start the
2323-- tick thread.