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
44
44
-- | `VDom` nodes.
45
45
-- |
46
46
-- | 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
49
49
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)
55
54
56
55
foreign import data Graft ∷ Type → Type → Type
57
56
You can’t perform that action at this time.
0 commit comments