on develop help sign in
Remove use-text-jsstring flag
1260cc0Luigy Leon
reflex-dom-core/reflex-dom-core.cabal−10
@@ -40,11 +40,6 @@ flag profile-reflex
40 default: False
40 default: False
41 manual: True
41 manual: True
42
42
43−flag use-text-jsstring
44− description: Defines an identifier to determine if the package is being built with text-jsstring patched packages
45− default: False
46− manual: True
47−
48library
43library
49 hs-source-dirs: src
44 hs-source-dirs: src
50 build-depends:
45 build-depends:
@@ -90,11 +85,6 @@ library
90 if !os(windows)
85 if !os(windows)
91 build-depends: unix == 2.7.*
86 build-depends: unix == 2.7.*
92
87
93− if impl(ghcjs) && flag(use-text-jsstring)
94− build-depends:
95− ghcjs-json
96− cpp-options: -DUSE_TEXT_JSSTRING
97−
98 exposed-modules:
88 exposed-modules:
99 Foreign.JavaScript.TH
89 Foreign.JavaScript.TH
100 Foreign.JavaScript.Orphans
90 Foreign.JavaScript.Orphans
reflex-dom-core/src-ghcjs/Reflex/Dom/WebSocket/Internal.hs+1−8
@@ -7,16 +7,9 @@ import Control.Exception
7import Data.Aeson
7import Data.Aeson
8import Data.JSString (JSString)
8import Data.JSString (JSString)
9import Foreign.JavaScript.Utils
9import Foreign.JavaScript.Utils
10+import GHCJS.Marshal ()
10import Language.Javascript.JSaddle
11import Language.Javascript.JSaddle
11import System.IO.Unsafe
12import System.IO.Unsafe
12−-- When on ghcjs and using packages with jsstring patches it removes the FromJSVal
13−-- instance for Value from ghcjs-base. This makes it so that if the patches
14−-- are used then the instance comes from ghcjs-json
15−#ifdef USE_TEXT_JSSTRING
16−import JavaScript.JSON.Types.FromJSVal ()
17−#else
18−import GHCJS.Marshal ()
19−#endif
20
13
21jsonDecode :: FromJSON a => JSString -> Maybe a
14jsonDecode :: FromJSON a => JSString -> Maybe a
22jsonDecode t = do
15jsonDecode t = do