on develop help sign in
Eliminate specialization in benchmark.hs
940c042Ryan Trinkle
reflex-dom/benchmark.hs−67
@@ -31,73 +31,6 @@ import Data.FastMutableIntMap
31import qualified GHCJS.DOM.Element as DOM
31import qualified GHCJS.DOM.Element as DOM
32import qualified GHCJS.DOM.Types as DOM
32import qualified GHCJS.DOM.Types as DOM
33
33
34−{-# SPECIALIZE makeElement :: forall er a. Text -> ElementConfig er (SpiderTimeline Global) GhcjsDomSpace -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) a -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) ((Element er GhcjsDomSpace (SpiderTimeline Global), a), DOM.Element) #-}
35−
36−{-# SPECIALIZE wrap :: forall er. RawElement GhcjsDomSpace -> RawElementConfig er (SpiderTimeline Global) GhcjsDomSpace -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (Element er GhcjsDomSpace (SpiderTimeline Global)) #-}
37−
38−{- SPECIALIZE mapDMapWithAdjustImpl :: forall k v v' p.
39− ( (forall a. k a -> Compose ((,) (Bool, Event (SpiderTimeline Global) ())) v a -> (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (v' a))
40− -> DMap k (Compose ((,) (Bool, Event (SpiderTimeline Global) ())) v)
41− -> Event (SpiderTimeline Global) (p k (Compose ((,) (Bool, Event (SpiderTimeline Global) ())) v))
42− -> (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (DMap k v', Event (SpiderTimeline Global) (p k v'))
43− )
44− -> ((forall a. v a -> Compose ((,) (Bool, Event (SpiderTimeline Global) ())) v a) -> p k v -> p k (Compose ((,) (Bool, Event (SpiderTimeline Global) ())) v))
45− -> (forall a. k a -> v a -> PostBuildT (SpiderTimeline Global) (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (v' a))
46− -> DMap k v
47− -> Event (SpiderTimeline Global) (p k v)
48− -> PostBuildT (SpiderTimeline Global) (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (DMap k v', Event (SpiderTimeline Global) (p k v'))
49− #-}
50−
51−{-# SPECIALIZE mapIntMapWithAdjustImpl :: forall v v'.
52− ( (IntMap.Key -> ((Bool, Event (SpiderTimeline Global) ()), v) -> (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) v')
53− -> IntMap ((Bool, Event (SpiderTimeline Global) ()), v)
54− -> Event (SpiderTimeline Global) (PatchIntMap ((Bool, Event (SpiderTimeline Global) ()), v))
55− -> (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (IntMap v', Event (SpiderTimeline Global) (PatchIntMap v'))
56− )
57− -> (IntMap.Key -> v -> PostBuildT (SpiderTimeline Global) (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) v')
58− -> IntMap v
59− -> Event (SpiderTimeline Global) (PatchIntMap v)
60− -> PostBuildT (SpiderTimeline Global) (ImmediateDomBuilderT Spider (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (IntMap v', Event (SpiderTimeline Global) (PatchIntMap v'))
61− #-}
62−
63−{-# SPECIALIZE append :: DOM.DocumentFragment -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) () #-}
64−
65−{-# SPECIALIZE drawChildUpdate :: forall k v' a. ImmediateDomBuilderEnv (SpiderTimeline Global) -> (IORef (ChildReadyState k) -> JSM ()) -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (v' a) -> RequesterT (SpiderTimeline Global) JSM Identity (TriggerEventT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (Compose ((,,,) DOM.DocumentFragment DOM.Text (IORef (ChildReadyState k))) v' a) #-}
66−
67−{- SPECIALIZE traverseDMapWithKeyWithAdjust' :: forall v v'. (forall a. (Const2 Int ()) a -> v a -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (v' a)) -> DMap (Const2 Int ()) v -> Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) v) -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (DMap (Const2 Int ()) v', Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) v')) #-}
68−
69−{-# SPECIALIZE traverseIntMapWithKeyWithAdjust' :: forall v v'. (IntMap.Key -> v -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) v') -> IntMap v -> Event (SpiderTimeline Global) (PatchIntMap v) -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (IntMap v', Event (SpiderTimeline Global) (PatchIntMap v')) #-}
70−
71−{- SPECIALIZE hoistTraverseWithKeyWithAdjust :: forall v v'.
72− (forall vv vv'.
73− (forall a. (Const2 Int ()) a -> vv a -> RequesterT (SpiderTimeline Global) JSM Identity (TriggerEventT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (vv' a))
74− -> DMap (Const2 Int ()) vv
75− -> Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) vv)
76− -> RequesterT (SpiderTimeline Global) JSM Identity (TriggerEventT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (DMap (Const2 Int ()) vv', Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) vv'))
77− ) -- ^ The base monad's traversal
78− -> (forall vv vv'. (forall a. vv a -> vv' a) -> PatchDMap (Const2 Int ()) vv -> PatchDMap (Const2 Int ()) vv') -- ^ A way of mapping over the patch type
79− -> (PatchDMap (Const2 Int ()) (Compose ((,,,) DOM.DocumentFragment DOM.Text (IORef (ChildReadyState (Const2 Int ())))) v') -> DMap (Const2 Int ()) (Constant (IORef (ChildReadyState (Const2 Int ())))) -> IO (DMap (Const2 Int ()) (Constant (IORef (ChildReadyState (Const2 Int ())))))) -- ^ Given a patch for the children DOM elements, produce a patch for the childrens' unreadiness state
80− -> (IORef (Map.Map (Some.Some (Const2 Int ())) DOM.Text) -> IORef DOM.Text -> PatchDMap (Const2 Int ()) (Compose ((,,,) DOM.DocumentFragment DOM.Text (IORef (ChildReadyState (Const2 Int ())))) v') -> JSM ()) -- ^ Apply a patch to the DOM
81− -> (forall a. (Const2 Int ()) a -> v a -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (v' a))
82− -> DMap (Const2 Int ()) v
83− -> Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) v)
84− -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (DMap (Const2 Int ()) v', Event (SpiderTimeline Global) (PatchDMap (Const2 Int ()) v'))
85− #-}
86−
87−{-# SPECIALIZE hoistTraverseIntMapWithKeyWithAdjust :: forall v v'.
88− ( (IntMap.Key -> v -> RequesterT (SpiderTimeline Global) JSM Identity (TriggerEventT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (DOM.DocumentFragment, DOM.Text, IORef ChildReadyStateInt, v'))
89− -> IntMap v
90− -> Event (SpiderTimeline Global) (PatchIntMap v)
91− -> RequesterT (SpiderTimeline Global) JSM Identity (TriggerEventT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global)))) (IntMap (DOM.DocumentFragment, DOM.Text, IORef ChildReadyStateInt, v'), Event (SpiderTimeline Global) (PatchIntMap (DOM.DocumentFragment, DOM.Text, IORef ChildReadyStateInt, v')))
92− ) -- ^ The base monad's traversal
93− -> (PatchIntMap (DOM.DocumentFragment, DOM.Text, IORef ChildReadyStateInt, v') -> IntMap (IORef ChildReadyStateInt) -> IO (IntMap (IORef ChildReadyStateInt))) -- ^ Given a patch for the children DOM elements, produce a patch for the childrens' unreadiness state
94− -> (IORef (IntMap DOM.Text) -> IORef DOM.Text -> PatchIntMap (DOM.DocumentFragment, DOM.Text, IORef ChildReadyStateInt, v') -> JSM ()) -- ^ Apply a patch to the DOM
95− -> (IntMap.Key -> v -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) v')
96− -> IntMap v
97− -> Event (SpiderTimeline Global) (PatchIntMap v)
98− -> ImmediateDomBuilderT (SpiderTimeline Global) (WithJSContextSingleton () (PerformEventT Spider (SpiderHost Global))) (IntMap v', Event (SpiderTimeline Global) (PatchIntMap v'))
99− #-}
100−
101--{-
34--{-
102main :: IO ()
35main :: IO ()
103main = mainWidget' $ do
36main = mainWidget' $ do