on develop help sign in
Remove use-text-jsstring flag

* A patched text-jsstring ghcjs-base removes the instances for FromJSVal/ToJSVal for Aeson.Value which would normally come from GHCJS.Marshal module. In a patched jsaddle for text-jsstring it has been updated to reexport these instances making this flag redundant. This is also safe when text-jsstring patches are disabled since the instance would come from GHCJS.Marshal

commit1260cc040030a91508bb8fc0c9acae6addb7ada0 authorLuigy Leon <luigy@outlook.com> dateWed 25 Oct 2017, 15:07 (9 years ago) parent19d05f8
2 files changed+1−18
reflex-dom-core/reflex-dom-core.cabal−10 reflex-dom-core/src-ghcjs/Reflex/Dom/WebSocket/Internal.hs+1−8
reflex-dom-core/reflex-dom-core.cabal−10
@@ -40,11 +40,6 @@ flag profile-reflex
4040 default: False
4141 manual: True
4242
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−
4843library
4944 hs-source-dirs: src
5045 build-depends:
@@ -90,11 +85,6 @@ library
9085 if !os(windows)
9186 build-depends: unix == 2.7.*
9287
93− if impl(ghcjs) && flag(use-text-jsstring)
94− build-depends:
95− ghcjs-json
96− cpp-options: -DUSE_TEXT_JSSTRING
97−
9888 exposed-modules:
9989 Foreign.JavaScript.TH
10090 Foreign.JavaScript.Orphans
reflex-dom-core/src-ghcjs/Reflex/Dom/WebSocket/Internal.hs+1−8
@@ -7,16 +7,9 @@ import Control.Exception
77import Data.Aeson
88import Data.JSString (JSString)
99import Foreign.JavaScript.Utils
10+import GHCJS.Marshal ()
1011import Language.Javascript.JSaddle
1112import 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
2013
2114jsonDecode :: FromJSON a => JSString -> Maybe a
2215jsonDecode t = do