File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,13 @@ instance bifunctorVDom ∷ Bifunctor VDom where
4444-- | `VDom` nodes.
4545-- |
4646-- | Using this function will fuse any `Graft`s present in the `VDom`.
47- renderWidget ∷ ∀ a w x . (w → VDom a x ) → VDom a w → VDom a x
48- renderWidget f = case _ of
47+ renderWidget ∷ ∀ a b w x . (a → b ) → ( w → VDom b x ) → VDom a w → VDom b x
48+ renderWidget f g = case _ of
4949 Text a → Text a
50- Elem ns n a ch → Elem ns n a (map (renderWidget f) ch)
51- Keyed ns n a ch → Keyed ns n a (map (map (renderWidget f)) ch)
52- Widget w → f w
53- Grafted g → Grafted $ unGraft (\(Graft fa fw v) →
54- graft (Graft identity identity (renderWidget f (bimap fa fw v)))) g
50+ Elem ns n a ch → Elem ns n (f a) (map (renderWidget f g) ch)
51+ Keyed ns n a ch → Keyed ns n (f a) (map (map (renderWidget f g)) ch)
52+ Widget w → g w
53+ Grafted gaw → renderWidget f g (runGraft gaw)
5554
5655foreign import data Graft ∷ Type → Type → Type
5756
You can’t perform that action at this time.
0 commit comments