on develop help sign in
temp
785099bTom Smalley
reflex-dom-core/reflex-dom-core.cabal+23−22
@@ -64,6 +64,7 @@ library
64 monad-control >= 1.0.1 && < 1.1,
64 monad-control >= 1.0.1 && < 1.1,
65 mtl >= 2.1 && < 2.3,
65 mtl >= 2.1 && < 2.3,
66 primitive >= 0.5 && < 0.7,
66 primitive >= 0.5 && < 0.7,
67+ random,
67 ref-tf == 0.4.*,
68 ref-tf == 0.4.*,
68 reflex == 0.5.*,
69 reflex == 0.5.*,
69 semigroups >= 0.16 && < 0.19,
70 semigroups >= 0.16 && < 0.19,
@@ -144,31 +145,31 @@ library
144 build-depends:
145 build-depends:
145 dependent-sum == 0.4.*
146 dependent-sum == 0.4.*
146
147
147−test-suite hlint
148+--test-suite hlint
148− build-depends: base, hlint
149+-- build-depends: base, hlint
149− hs-source-dirs: test
150+-- hs-source-dirs: test
150− main-is: hlint.hs
151+-- main-is: hlint.hs
151− type: exitcode-stdio-1.0
152+-- type: exitcode-stdio-1.0
152
153
153-- broken test on base 4.11 & ghc 8.4.3
154-- broken test on base 4.11 & ghc 8.4.3
154-- needs to be updated for changes in GHC.Stats
155-- needs to be updated for changes in GHC.Stats
155−test-suite gc
156+--test-suite gc
156− build-depends: base
157+-- build-depends: base
157− , reflex
158+-- , reflex
158− , reflex-dom-core
159+-- , reflex-dom-core
159− , jsaddle
160+-- , jsaddle
160− , jsaddle-warp
161+-- , jsaddle-warp
161− , linux-namespaces
162+-- , linux-namespaces
162− , process
163+-- , process
163− , temporary
164+-- , temporary
164− , unix
165+-- , unix
165− hs-source-dirs: test
166+-- hs-source-dirs: test
166− ghc-options: -rtsopts -with-rtsopts=-T -Wall -fwarn-tabs -funbox-strict-fields -O2 -ferror-spans
167+-- ghc-options: -rtsopts -with-rtsopts=-T -Wall -fwarn-tabs -funbox-strict-fields -O2 -ferror-spans
167− ghc-prof-options: -fprof-auto -optP-DPROFILING
168+-- ghc-prof-options: -fprof-auto -optP-DPROFILING
168− main-is: gc.hs
169+-- main-is: gc.hs
169− type: exitcode-stdio-1.0
170+-- type: exitcode-stdio-1.0
170− if !os(linux) || !arch(x86_64) || impl(ghc >= 8.4.0)
171+-- if !os(linux) || !arch(x86_64) || impl(ghc >= 8.4.0)
171− buildable: False
172+-- buildable: False
172
173
173source-repository head
174source-repository head
174 type: git
175 type: git
reflex-dom-core/src/Reflex/Dom/Builder/Static.hs+1
@@ -264,6 +264,7 @@ instance SupportsStaticDomBuilder t m => DomBuilder t (StaticDomBuilderT t m) wh
264 --TODO: Do not escape quotation marks; see https://stackoverflow.com/questions/25612166/what-characters-must-be-escaped-in-html-5
264 --TODO: Do not escape quotation marks; see https://stackoverflow.com/questions/25612166/what-characters-must-be-escaped-in-html-5
265 shouldEscape <- asks _staticDomBuilderEnv_shouldEscape
265 shouldEscape <- asks _staticDomBuilderEnv_shouldEscape
266 let escape = if shouldEscape then fromHtmlEscapedText else byteString . encodeUtf8
266 let escape = if shouldEscape then fromHtmlEscapedText else byteString . encodeUtf8
267+ modify ("<!--text-->" :) -- TODO FIXME
267 modify . (:) =<< case mSetContents of
268 modify . (:) =<< case mSetContents of
268 Nothing -> return (pure (escape initialContents))
269 Nothing -> return (pure (escape initialContents))
269 Just setContents -> hold (escape initialContents) $ fmapCheap escape setContents --Only because it doesn't get optimized when profiling is on
270 Just setContents -> hold (escape initialContents) $ fmapCheap escape setContents --Only because it doesn't get optimized when profiling is on
reflex-dom-core/src/Reflex/Dom/Prerender.hs+6−24
@@ -74,30 +74,12 @@ prerender server client = do
74 endPrerenderBlock
74 endPrerenderBlock
75 pure a
75 pure a
76
76
77−instance ( HasJS js m
78− , HasJS js (Performable m)
79− , HasJSContext m
80− , HasJSContext (Performable m)
81− , MonadJSM m
82− , MonadJSM (Performable m)
83− , MonadFix m
84− , MonadFix (Performable m)
85− , ReflexHost t
86− ) => Prerender js (ImmediateDomBuilderT t m) where
77+instance (PrerenderClientConstraint js m, ReflexHost t) => Prerender js (ImmediateDomBuilderT t m) where
87 prerenderClientDict = Just Dict
78 prerenderClientDict = Just Dict
88 startPrerenderBlock = return ()
79 startPrerenderBlock = return ()
89 endPrerenderBlock = return ()
80 endPrerenderBlock = return ()
90
81
91−instance ( HasJS js m
92− , HasJS js (Performable m)
93− , HasJSContext m
94− , HasJSContext (Performable m)
95− , MonadJSM m
96− , MonadJSM (Performable m)
97− , MonadFix m
98− , MonadFix (Performable m)
99− , ReflexHost t
100− ) => Prerender js (HydrationDomBuilderT t m) where
82+instance (PrerenderClientConstraint js m, ReflexHost t) => Prerender js (HydrationDomBuilderT t m) where
101 prerenderClientDict = Just Dict
83 prerenderClientDict = Just Dict
102 startPrerenderBlock = do
84 startPrerenderBlock = do
103 depth <- HydrationDomBuilderT $ asks _hydrationDomBuilderEnv_prerenderDepth
85 depth <- HydrationDomBuilderT $ asks _hydrationDomBuilderEnv_prerenderDepth
@@ -132,10 +114,10 @@ deleteToPrerenderEnd = do
132 | t == endMarker -> do
114 | t == endMarker -> do
133 d <- liftIO $ readIORef depth
115 d <- liftIO $ readIORef depth
134 if d == 0
116 if d == 0
135− then pure True
117+ then pure True
136− else do
118+ else do
137− liftIO $ modifyIORef' depth pred
119+ liftIO $ modifyIORef' depth pred
138− pure False
120+ pure False
139 _ -> pure False
121 _ -> pure False
140 pure $ n == "SCRIPT" && attrCheck) DOM.Element
122 pure $ n == "SCRIPT" && attrCheck) DOM.Element
141 deleteBetweenInclusive startNode endNode
123 deleteBetweenInclusive startNode endNode