@@ -147,9 +147,9 @@ instance (Reflex t, MonadAdjust t m, MonadHold t m) => MonadAdjust t (StaticDomB
147147 runWithReplace a0 a' = do
148148 e <- StaticDomBuilderT ask
149149 (result0, result') <- lift $ runWithReplace (runStaticDomBuilderT a0 e) (flip runStaticDomBuilderT e <$> a')
150− o <- hold (snd result0) $ snd <$> result'
150+ o <- hold (snd result0) $ fmapCheap snd result'
151151 StaticDomBuilderT $ modify $ (:) $ join o
152− return (fst result0, fst <$> result')
152+ return (fst result0, fmapCheap fst result')
153153 sequenceDMapWithAdjust (dm0 :: DMap k (StaticDomBuilderT t m)) dm' = do
154154 e <- StaticDomBuilderT ask
155155 let loweredDm0 = mapKeyValuePairsMonotonic (\(k :=> v) -> WrapArg k :=> fmap swap (runStaticDomBuilderT v e)) dm0
@@ -178,7 +178,7 @@ instance SupportsStaticDomBuilder t m => DomBuilder t (StaticDomBuilderT t m) wh
178178 --TODO: Do not escape quotation marks; see https://stackoverflow.com/questions/25612166/what-characters-must-be-escaped-in-html-5
179179 shouldEscape <- asks _staticDomBuilderEnv_shouldEscape
180180 let escape = if shouldEscape then fromHtmlEscapedText else byteString . encodeUtf8
181− modify . (:) <=< hold (escape initialContents) $ fmap escape setContents
181+ modify . (:) <=< hold (escape initialContents) $ fmapCheap escape setContents --Only because it doesn't get optimized when profiling is on
182182 return $ TextNode ()
183183 {-# INLINABLE element #-}
184184 element elementTag cfg child = do