From 9a91b8fee634eb107d0a5accb868536cf4dad2b9 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Mon, 10 Apr 2023 14:13:56 -0700 Subject: [PATCH] Consumes attributes as an array (#93) * Initial change to element2 * Passes tests * Redoes examples * Faster match on empty cases --- README.md | 35 +++-- examples/canvas/Canvas.purs | 45 +++--- examples/hello-world/HelloWorld.purs | 6 +- examples/nested/Nested.purs | 12 +- examples/portal/Portal.purs | 30 ++-- examples/pursx/Pursx.purs | 5 +- examples/readme-legend/ReadmeLegend.purs | 50 +++---- package.json | 1 - src/Deku/Control.purs | 9 +- src/Deku/DOM.purs | 2 +- src/Deku/DOM/Elt/A.purs | 2 +- src/Deku/DOM/Elt/Abbr.purs | 2 +- src/Deku/DOM/Elt/Acronym.purs | 2 +- src/Deku/DOM/Elt/Address.purs | 2 +- src/Deku/DOM/Elt/Animate.purs | 2 +- src/Deku/DOM/Elt/AnimateMotion.purs | 2 +- src/Deku/DOM/Elt/AnimateTransform.purs | 2 +- src/Deku/DOM/Elt/Applet.purs | 2 +- src/Deku/DOM/Elt/Area.purs | 2 +- src/Deku/DOM/Elt/Article.purs | 2 +- src/Deku/DOM/Elt/Aside.purs | 2 +- src/Deku/DOM/Elt/Audio.purs | 2 +- src/Deku/DOM/Elt/B.purs | 2 +- src/Deku/DOM/Elt/Base.purs | 2 +- src/Deku/DOM/Elt/Basefont.purs | 2 +- src/Deku/DOM/Elt/Bdi.purs | 2 +- src/Deku/DOM/Elt/Bdo.purs | 2 +- src/Deku/DOM/Elt/Big.purs | 2 +- src/Deku/DOM/Elt/Blockquote.purs | 2 +- src/Deku/DOM/Elt/Body.purs | 2 +- src/Deku/DOM/Elt/Br.purs | 2 +- src/Deku/DOM/Elt/Button.purs | 2 +- src/Deku/DOM/Elt/Canvas.purs | 2 +- src/Deku/DOM/Elt/Caption.purs | 2 +- src/Deku/DOM/Elt/Center.purs | 2 +- src/Deku/DOM/Elt/Circle.purs | 2 +- src/Deku/DOM/Elt/Cite.purs | 2 +- src/Deku/DOM/Elt/ClipPath.purs | 2 +- src/Deku/DOM/Elt/Code.purs | 2 +- src/Deku/DOM/Elt/Col.purs | 2 +- src/Deku/DOM/Elt/Colgroup.purs | 2 +- src/Deku/DOM/Elt/Datalist.purs | 2 +- src/Deku/DOM/Elt/Dd.purs | 2 +- src/Deku/DOM/Elt/Defs.purs | 2 +- src/Deku/DOM/Elt/Del.purs | 2 +- src/Deku/DOM/Elt/Desc.purs | 2 +- src/Deku/DOM/Elt/Details.purs | 2 +- src/Deku/DOM/Elt/Dfn.purs | 2 +- src/Deku/DOM/Elt/Dialog.purs | 2 +- src/Deku/DOM/Elt/Dir.purs | 2 +- src/Deku/DOM/Elt/Discard.purs | 2 +- src/Deku/DOM/Elt/Div.purs | 2 +- src/Deku/DOM/Elt/Dl.purs | 2 +- src/Deku/DOM/Elt/Dt.purs | 2 +- src/Deku/DOM/Elt/Ellipse.purs | 2 +- src/Deku/DOM/Elt/Em.purs | 2 +- src/Deku/DOM/Elt/Embed.purs | 2 +- src/Deku/DOM/Elt/FeBlend.purs | 2 +- src/Deku/DOM/Elt/FeColorMatrix.purs | 2 +- src/Deku/DOM/Elt/FeComponentTransfer.purs | 2 +- src/Deku/DOM/Elt/FeComposite.purs | 2 +- src/Deku/DOM/Elt/FeConvolveMatrix.purs | 2 +- src/Deku/DOM/Elt/FeDiffuseLighting.purs | 2 +- src/Deku/DOM/Elt/FeDisplacementMap.purs | 2 +- src/Deku/DOM/Elt/FeDistantLight.purs | 2 +- src/Deku/DOM/Elt/FeDropShadow.purs | 2 +- src/Deku/DOM/Elt/FeFlood.purs | 2 +- src/Deku/DOM/Elt/FeFuncA.purs | 2 +- src/Deku/DOM/Elt/FeFuncB.purs | 2 +- src/Deku/DOM/Elt/FeFuncG.purs | 2 +- src/Deku/DOM/Elt/FeFuncR.purs | 2 +- src/Deku/DOM/Elt/FeGaussianBlur.purs | 2 +- src/Deku/DOM/Elt/FeImage.purs | 2 +- src/Deku/DOM/Elt/FeMerge.purs | 2 +- src/Deku/DOM/Elt/FeMergeNode.purs | 2 +- src/Deku/DOM/Elt/FeMorphology.purs | 2 +- src/Deku/DOM/Elt/FeOffset.purs | 2 +- src/Deku/DOM/Elt/FePointLight.purs | 2 +- src/Deku/DOM/Elt/FeSpecularLighting.purs | 2 +- src/Deku/DOM/Elt/FeSpotLight.purs | 2 +- src/Deku/DOM/Elt/FeTile.purs | 2 +- src/Deku/DOM/Elt/FeTurbulence.purs | 2 +- src/Deku/DOM/Elt/Fieldset.purs | 2 +- src/Deku/DOM/Elt/Figcaption.purs | 2 +- src/Deku/DOM/Elt/Figure.purs | 2 +- src/Deku/DOM/Elt/Filter.purs | 2 +- src/Deku/DOM/Elt/Font.purs | 2 +- src/Deku/DOM/Elt/Footer.purs | 2 +- src/Deku/DOM/Elt/ForeignObject.purs | 2 +- src/Deku/DOM/Elt/Form.purs | 2 +- src/Deku/DOM/Elt/Frame.purs | 2 +- src/Deku/DOM/Elt/Frameset.purs | 2 +- src/Deku/DOM/Elt/G.purs | 2 +- src/Deku/DOM/Elt/H1.purs | 2 +- src/Deku/DOM/Elt/H2.purs | 2 +- src/Deku/DOM/Elt/H3.purs | 2 +- src/Deku/DOM/Elt/H4.purs | 2 +- src/Deku/DOM/Elt/H5.purs | 2 +- src/Deku/DOM/Elt/H6.purs | 2 +- src/Deku/DOM/Elt/Head.purs | 2 +- src/Deku/DOM/Elt/Header.purs | 2 +- src/Deku/DOM/Elt/Hr.purs | 2 +- src/Deku/DOM/Elt/Html.purs | 2 +- src/Deku/DOM/Elt/I.purs | 2 +- src/Deku/DOM/Elt/Iframe.purs | 2 +- src/Deku/DOM/Elt/Image.purs | 2 +- src/Deku/DOM/Elt/Img.purs | 2 +- src/Deku/DOM/Elt/Input.purs | 2 +- src/Deku/DOM/Elt/Ins.purs | 2 +- src/Deku/DOM/Elt/Kbd.purs | 2 +- src/Deku/DOM/Elt/Label.purs | 2 +- src/Deku/DOM/Elt/Legend.purs | 2 +- src/Deku/DOM/Elt/Li.purs | 2 +- src/Deku/DOM/Elt/Line.purs | 2 +- src/Deku/DOM/Elt/LinearGradient.purs | 2 +- src/Deku/DOM/Elt/Link.purs | 2 +- src/Deku/DOM/Elt/Main.purs | 2 +- src/Deku/DOM/Elt/Map.purs | 2 +- src/Deku/DOM/Elt/Mark.purs | 2 +- src/Deku/DOM/Elt/Marker.purs | 2 +- src/Deku/DOM/Elt/Mask.purs | 2 +- src/Deku/DOM/Elt/Meta.purs | 2 +- src/Deku/DOM/Elt/Metadata.purs | 2 +- src/Deku/DOM/Elt/Meter.purs | 2 +- src/Deku/DOM/Elt/Mpath.purs | 2 +- src/Deku/DOM/Elt/Nav.purs | 2 +- src/Deku/DOM/Elt/Noframes.purs | 2 +- src/Deku/DOM/Elt/Noscript.purs | 2 +- src/Deku/DOM/Elt/Object.purs | 2 +- src/Deku/DOM/Elt/Ol.purs | 2 +- src/Deku/DOM/Elt/Optgroup.purs | 2 +- src/Deku/DOM/Elt/Option.purs | 2 +- src/Deku/DOM/Elt/Output.purs | 2 +- src/Deku/DOM/Elt/P.purs | 2 +- src/Deku/DOM/Elt/Param.purs | 2 +- src/Deku/DOM/Elt/Path.purs | 2 +- src/Deku/DOM/Elt/Pattern.purs | 2 +- src/Deku/DOM/Elt/Picture.purs | 2 +- src/Deku/DOM/Elt/Polygon.purs | 2 +- src/Deku/DOM/Elt/Polyline.purs | 2 +- src/Deku/DOM/Elt/Pre.purs | 2 +- src/Deku/DOM/Elt/Progress.purs | 2 +- src/Deku/DOM/Elt/Q.purs | 2 +- src/Deku/DOM/Elt/RadialGradient.purs | 2 +- src/Deku/DOM/Elt/Rect.purs | 2 +- src/Deku/DOM/Elt/Rp.purs | 2 +- src/Deku/DOM/Elt/Rt.purs | 2 +- src/Deku/DOM/Elt/Ruby.purs | 2 +- src/Deku/DOM/Elt/S.purs | 2 +- src/Deku/DOM/Elt/Samp.purs | 2 +- src/Deku/DOM/Elt/Script.purs | 2 +- src/Deku/DOM/Elt/Section.purs | 2 +- src/Deku/DOM/Elt/Select.purs | 2 +- src/Deku/DOM/Elt/Set.purs | 2 +- src/Deku/DOM/Elt/Small.purs | 2 +- src/Deku/DOM/Elt/Source.purs | 2 +- src/Deku/DOM/Elt/Span.purs | 2 +- src/Deku/DOM/Elt/Stop.purs | 2 +- src/Deku/DOM/Elt/Strike.purs | 2 +- src/Deku/DOM/Elt/Strong.purs | 2 +- src/Deku/DOM/Elt/Style.purs | 2 +- src/Deku/DOM/Elt/Sub.purs | 2 +- src/Deku/DOM/Elt/Summary.purs | 2 +- src/Deku/DOM/Elt/Sup.purs | 2 +- src/Deku/DOM/Elt/Svg.purs | 2 +- src/Deku/DOM/Elt/Switch.purs | 2 +- src/Deku/DOM/Elt/Symbol.purs | 2 +- src/Deku/DOM/Elt/Table.purs | 2 +- src/Deku/DOM/Elt/Tbody.purs | 2 +- src/Deku/DOM/Elt/Td.purs | 2 +- src/Deku/DOM/Elt/Template.purs | 2 +- src/Deku/DOM/Elt/Text.purs | 2 +- src/Deku/DOM/Elt/TextPath.purs | 2 +- src/Deku/DOM/Elt/Textarea.purs | 2 +- src/Deku/DOM/Elt/Tfoot.purs | 2 +- src/Deku/DOM/Elt/Th.purs | 2 +- src/Deku/DOM/Elt/Thead.purs | 2 +- src/Deku/DOM/Elt/Time.purs | 2 +- src/Deku/DOM/Elt/Title.purs | 2 +- src/Deku/DOM/Elt/Tr.purs | 2 +- src/Deku/DOM/Elt/Track.purs | 2 +- src/Deku/DOM/Elt/Tspan.purs | 2 +- src/Deku/DOM/Elt/Tt.purs | 2 +- src/Deku/DOM/Elt/U.purs | 2 +- src/Deku/DOM/Elt/Ul.purs | 2 +- src/Deku/DOM/Elt/Use.purs | 2 +- src/Deku/DOM/Elt/Var.purs | 2 +- src/Deku/DOM/Elt/Video.purs | 2 +- src/Deku/DOM/Elt/View.purs | 2 +- src/Deku/DOM/Elt/Wbr.purs | 2 +- src/Deku/DOM/Elt/Xdata.purs | 2 +- test/Performance/Test/State/Deku.purs | 46 +++--- test/Performance/Test/Todo/Deku.purs | 103 +++++++------ test/Test/Main.purs | 167 ++++++++++------------ 194 files changed, 419 insertions(+), 454 deletions(-) diff --git a/README.md b/README.md index b4543654..8ca3bbfd 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ A PureScript web framework for apps that need to be fast. Indexed documentation for Deku is published on [Pursuit](https://pursuit.purescript.org/packages/purescript-deku). Deku's structure is currently highly decentralized, so it can be tough to know where to look. Here's a small Deku app that acts as a legend for the Pursuit docs. ```purescript + main :: Effect Unit main = -- `Deku.Toplevel` contains runInBody @@ -36,24 +37,22 @@ main = -- `Deku.DOM`, often imported as `D`, contains all DOM elements, -- attributes, and event handlers D.div - ( oneOf - [ - -- `Deku.Listeners` contains helper functions for various common - -- listeners like `click` and `keyUp` - click $ counter <#> add 1 >>> setCounter - -- `Deku.Attributes` contains helper functions for various common - -- attributes like `style` and `klass` (an alias for `class`) - , klass_ "color: crimson;" - -- `Deku.CSS` contains `render`, which allows you to take `CSS` from - -- `purescript-css` and use it in a Deku application - , style_ $ render do - color (rgb 42 142 242) - fontWeight bold - -- `Deku.Attribute` contains constructors for - -- uncommon and ad hoc `x-` attributes - , pure (xdata "my-attr" "my-val") - ] - ) + [ + -- `Deku.Listeners` contains helper functions for various common + -- listeners like `click` and `keyUp` + click $ counter <#> add 1 >>> setCounter + -- `Deku.Attributes` contains helper functions for various common + -- attributes like `style` and `klass` (an alias for `class`) + , klass_ "color: crimson;" + -- `Deku.CSS` contains `render`, which allows you to take `CSS` from + -- `purescript-css` and use it in a Deku application + , style_ $ render do + color (rgb 42 142 242) + fontWeight bold + -- `Deku.Attribute` contains constructors for + -- uncommon and ad hoc `x-` attributes + , pure (xdata "my-attr" "my-val") + ] [ -- `Deku.Control` contains all non-element buiding blocks -- for applications, including `text` and `<#~>`, which diff --git a/examples/canvas/Canvas.purs b/examples/canvas/Canvas.purs index 4b6aff32..0c1ee5ec 100644 --- a/examples/canvas/Canvas.purs +++ b/examples/canvas/Canvas.purs @@ -3,7 +3,7 @@ module Deku.Example.SVG where import Prelude import Control.Monad.ST.Class (liftST) -import Data.Foldable (oneOf, traverse_) +import Data.Foldable (traverse_) import Deku.Attribute ((!:=)) import Deku.Core (Nut) import Deku.DOM as D @@ -17,36 +17,33 @@ import Web.HTML.HTMLCanvasElement as HTMLCanvasElement mySVG :: Nut mySVG = D.div_ - [ D.svg (oneOf [ D.Height !:= "100", D.Width !:= "100" ]) + [ D.svg [ D.Height !:= "100", D.Width !:= "100" ] [ D.circle - ( oneOf - [ D.Cx !:= "50" - , D.Cy !:= "50" - , D.R !:= "40" - , D.Stroke !:= "black" - , D.StrokeWidth !:= "3" - , D.Fill !:= "red" - ] - ) + [ D.Cx !:= "50" + , D.Cy !:= "50" + , D.R !:= "40" + , D.Stroke !:= "black" + , D.StrokeWidth !:= "3" + , D.Fill !:= "red" + ] + [] ] ] myCanvas :: Nut myCanvas = D.canvas - ( oneOf - [ D.Width !:= "400px" - , D.Height !:= "400px" - , D.Self !:= HTMLCanvasElement.fromElement >>> traverse_ \e -> do - ctx <- getContext2D - ( ( unsafeCoerce - :: HTMLCanvasElement.HTMLCanvasElement -> CanvasElement - ) e - ) - setFillStyle ctx "blue" - fillRect ctx { height: 100.0, width: 100.0, x: 0.0, y: 0.0 } - ] - ) + [ D.Width !:= "400px" + , D.Height !:= "400px" + , D.Self !:= HTMLCanvasElement.fromElement >>> traverse_ \e -> do + ctx <- getContext2D + ( ( unsafeCoerce + :: HTMLCanvasElement.HTMLCanvasElement -> CanvasElement + ) e + ) + setFillStyle ctx "blue" + fillRect ctx { height: 100.0, width: 100.0, x: 0.0, y: 0.0 } + ] [] scene :: Nut diff --git a/examples/hello-world/HelloWorld.purs b/examples/hello-world/HelloWorld.purs index a450c81e..43351a45 100644 --- a/examples/hello-world/HelloWorld.purs +++ b/examples/hello-world/HelloWorld.purs @@ -29,7 +29,7 @@ scene = CC.envy $ bus $ \push -> lcmap (alt (pure true)) \event -> do [ D.div empty [ C.text (pure "Stops after 4 clicks") ] , C.text (event <#> if _ then "click " else "kcilc ") , D.button - ( counter event + [counter event # filterMap (\(Tuple x y) -> if y < 4 then Just x else Nothing) # map @@ -42,10 +42,10 @@ scene = CC.envy $ bus $ \push -> lcmap (alt (pure true)) \event -> do ) # keepLatest - ) + ] [ C.text_ "me" ] ] - , D.input (pure $ D.Autofocus := "") [] + , D.input [pure $ D.Autofocus := ""] [] ] main :: Effect Unit diff --git a/examples/nested/Nested.purs b/examples/nested/Nested.purs index 9dfc0a1b..dcd6df06 100644 --- a/examples/nested/Nested.purs +++ b/examples/nested/Nested.purs @@ -9,13 +9,11 @@ import Data.FastVect.FastVect as V import Data.Int (floor) import Data.Monoid.Additive (Additive(..)) import Data.Tuple (Tuple(..)) -import Data.Tuple.Nested ((/\)) import Deku.Attribute ((:=)) import Deku.Control (portal, switcher) import Deku.Control as C import Deku.Core (Nut, dyn, fixed, insert_, remove, sendToTop) import Deku.DOM as D -import Deku.Interpret (FFIDOMSnapshot) import Deku.Toplevel (runInBody) import Effect (Effect) import Effect.Random as Random @@ -57,20 +55,20 @@ scene :: Array Nut scene = [ D.div_ [ portal - ( D.video (pure (D.Controls := "true") <|> pure (D.Width := "250")) + ( D.video [pure (D.Controls := "true") <|> pure (D.Width := "250")] [ D.source - ( pure + [pure ( D.Src := "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" ) <|> pure (D.Xtype := "video/webm") - ) + ] [] ] : V.empty ) ( \i -> switcher ( \rgb -> D.div - (pure (D.Style := "background-color: " <> rgb <> ";")) + [pure (D.Style := "background-color: " <> rgb <> ";")] [ V.index (Proxy :: _ 0) i ] ) (sample_ rdm (interval 1000)) @@ -80,7 +78,7 @@ scene = ( \rgb -> pure ( insert_ $ D.div - (pure (D.Style := "background-color: " <> rgb <> ";")) + [pure (D.Style := "background-color: " <> rgb <> ";")] [ C.text_ "hello" ] ) <|> delay 1432 (pure sendToTop) <|> delay 2000 (pure remove) ) diff --git a/examples/portal/Portal.purs b/examples/portal/Portal.purs index 61485334..79a08fb0 100644 --- a/examples/portal/Portal.purs +++ b/examples/portal/Portal.purs @@ -29,13 +29,13 @@ main = runInBody $ portal ( map ( \i -> D.video - ( oneOfMap pure + [ oneOfMap pure [ D.Controls := "true", D.Width := "250" ] - ) + ] [ D.source - ( oneOfMap pure + [oneOfMap pure [ D.Src := i, D.Xtype := "video/mp4" ] - ) + ] [] ] ) @@ -54,7 +54,7 @@ main = runInBody <<< ev D.div_ [ D.button - (pure $ D.OnClick := cb (const $ push unit)) + [pure $ D.OnClick := cb (const $ push unit)] [ text_ "Switch videos" ] , D.div_ [ flips true, flips false ] @@ -70,13 +70,13 @@ main = runInBody $ portal ( map ( \i -> D.video - ( oneOfMap pure + [oneOfMap pure [ D.Controls := "true", D.Width := "250" ] - ) + ] [ D.source - ( oneOfMap pure + [oneOfMap pure [ D.Src := i, D.Xtype := "video/mp4" ] - ) + ] [] ] ) @@ -95,7 +95,7 @@ main = runInBody <<< ev D.div_ [ D.button - (pure $ D.OnClick := cb (const $ push unit)) + [pure $ D.OnClick := cb (const $ push unit)] [ text_ "Toggle videos" ] , flips true ] @@ -110,13 +110,13 @@ main = runInBody $ portal ( map ( \i -> D.video - ( oneOfMap pure + [oneOfMap pure [ D.Controls := "true", D.Width := "250" ] - ) + ] [ D.source - ( oneOfMap pure + [oneOfMap pure [ D.Src := i, D.Xtype := "video/mp4" ] - ) + ] [] ] ) @@ -133,7 +133,7 @@ main = runInBody <<< ev D.div_ [ D.button - (pure $ D.OnClick := cb (const $ push unit)) + [pure $ D.OnClick := cb (const $ push unit)] [ text_ "Toggle videos" ] , flips true ] diff --git a/examples/pursx/Pursx.purs b/examples/pursx/Pursx.purs index 48d84fca..55a0882b 100644 --- a/examples/pursx/Pursx.purs +++ b/examples/pursx/Pursx.purs @@ -10,7 +10,6 @@ import Deku.Control (text_) import Deku.Control as C import Deku.Core (Nut, bus, envy) import Deku.DOM as D -import Deku.Interpret (FFIDOMSnapshot) import Deku.Pursx ((~~)) import Deku.Pursx.Anonymous (px, xp) import Deku.Toplevel (runInBody) @@ -37,9 +36,9 @@ myPxInception push aThirdThing = myPx ~~ { btn: pure (D.Style := "background-color: rgb(133,151,217)") , somethingElse: ( D.button - ( pure $ D.OnClick := + [pure $ D.OnClick := (cb (const $ push false)) - ) + ] [ C.text_ "I was dynamically inserted " ] ) , aThirdThing: aThirdThing diff --git a/examples/readme-legend/ReadmeLegend.purs b/examples/readme-legend/ReadmeLegend.purs index f99dfbd1..d43daf75 100644 --- a/examples/readme-legend/ReadmeLegend.purs +++ b/examples/readme-legend/ReadmeLegend.purs @@ -3,29 +3,19 @@ module Deku.Example.ReadmeLegend where import Prelude import CSS (bold, color, fontWeight, rgb) -import Control.Alt (alt) -import Control.Plus (empty) -import Data.Foldable (oneOf, oneOfMap) -import Data.Maybe (Maybe(..)) -import Data.Profunctor (lcmap) -import Data.Tuple (Tuple(..)) import Data.Tuple.Nested ((/\)) -import Deku.Attribute (cb, xdata, (:=)) +import Deku.Attribute (xdata) import Deku.Attributes (klass_, style_) import Deku.CSS (render) -import Deku.Control (text, text_) -import Deku.Control as C -import Deku.Core (Nut, Nut, bus) -import Deku.Core as CC +import Deku.Control (text) +import Deku.Core (Nut) import Deku.DOM as D import Deku.Do as Deku import Deku.Hooks (useState) -import Deku.Interpret (FFIDOMSnapshot) import Deku.Listeners (click) import Deku.Pursx ((~~)) import Deku.Toplevel (runInBody) import Effect (Effect) -import FRP.Event (Event, filterMap, keepLatest, mapAccum) import Type.Proxy (Proxy(..)) main :: Effect Unit @@ -47,24 +37,22 @@ main = -- `Deku.DOM`, often imported as `D`, contains all DOM elements, -- attributes, and event handlers D.div - ( oneOf - [ - -- `Deku.Listeners` contains helper functions for various common - -- listeners like `click` and `keyUp` - click $ counter <#> add 1 >>> setCounter - -- `Deku.Attributes` contains helper functions for various common - -- attributes like `style` and `klass` (an alias for `class`) - , klass_ "color: crimson;" - -- `Deku.CSS` contains `render`, which allows you to take `CSS` from - -- `purescript-css` and use it in a Deku application - , style_ $ render do - color (rgb 42 142 242) - fontWeight bold - -- `Deku.Attribute` contains constructors for - -- uncommon and ad hoc `x-` attributes - , pure (xdata "my-attr" "my-val") - ] - ) + [ + -- `Deku.Listeners` contains helper functions for various common + -- listeners like `click` and `keyUp` + click $ counter <#> add 1 >>> setCounter + -- `Deku.Attributes` contains helper functions for various common + -- attributes like `style` and `klass` (an alias for `class`) + , klass_ "color: crimson;" + -- `Deku.CSS` contains `render`, which allows you to take `CSS` from + -- `purescript-css` and use it in a Deku application + , style_ $ render do + color (rgb 42 142 242) + fontWeight bold + -- `Deku.Attribute` contains constructors for + -- uncommon and ad hoc `x-` attributes + , pure (xdata "my-attr" "my-val") + ] [ -- `Deku.Control` contains all non-element buiding blocks -- for applications, including `text` and `<#~>`, which diff --git a/package.json b/package.json index 66d48b65..d52ce397 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "postinstall": "node node_modules/puppeteer/install.js", "clean": "rm -rf .spago output node_modules *.lock", "build": "spago build", - "build-docs": "npx spago -x examples.dhall bundle-app --main Deku.Example.Docs.Static.Build --to examples/docs/Static/make.js && npx spago -x examples.dhall bundle-app --main Deku.Example.Docs.Static.Live --to examples/docs/Static/bundle.js --minify && cd examples/docs/Static && node make.js > index.html && cd ../../..", "build:examples": "spago -x examples.dhall build", "build:test": "spago -x test/test.dhall build", "snapshot": "npm run bundle:performance && spago -x test/test.dhall run --main Performance.Snapshot.Write", diff --git a/src/Deku/Control.purs b/src/Deku/Control.purs index 3a936a9c..aee6ecfb 100644 --- a/src/Deku/Control.purs +++ b/src/Deku/Control.purs @@ -38,7 +38,7 @@ import Data.Tuple (snd) import Data.Tuple.Nested ((/\)) import Deku.Attribute (Attribute, AttributeValue(..), unsafeUnAttribute) import Deku.Core (DOMInterpret(..), Node(..), Nut(..), NutF(..), dyn, envy, insert_, remove, unsafeSetPos) -import FRP.Event (Event, Subscriber(..), merge, keepLatest, makeLemmingEventO, mapAccum, memoize) +import FRP.Event (Event, Subscriber(..), keepLatest, makeLemmingEventO, mapAccum, memoize, merge) import Prim.Int (class Compare) import Prim.Ordering (GT) import Record (union) @@ -83,7 +83,7 @@ unsafeSetAttribute (DOMInterpret { setProp, setCb, unsetAttribute }) id atts = elementify2 :: forall element . String - -> Event (Attribute element) + -> Array (Event (Attribute element)) -> Array Nut -> Nut elementify2 en attributes kids = Nut @@ -92,11 +92,14 @@ elementify2 en attributes kids = Nut step1 :: forall payload. Array (NutF payload) -> NutF payload step1 arr = NutF ( Element' - ( elementify en attributes + ( elementify en (aa attributes) ( NutF (BCore.fixed (coerce arr)) ) ) ) + aa [] = empty + aa [ aaa ] = aaa + aa x = merge x elementify :: forall payload element diff --git a/src/Deku/DOM.purs b/src/Deku/DOM.purs index cbc3a916..4c504e3b 100644 --- a/src/Deku/DOM.purs +++ b/src/Deku/DOM.purs @@ -1883,7 +1883,7 @@ unsafeCustomElement :: forall element . String -> Proxy element - -> Event (Attribute element) + -> Array (Event (Attribute element)) -> Array Nut -> Nut unsafeCustomElement name _ = elementify2 name diff --git a/src/Deku/DOM/Elt/A.purs b/src/Deku/DOM/Elt/A.purs index 7585a5b4..de4fc17c 100644 --- a/src/Deku/DOM/Elt/A.purs +++ b/src/Deku/DOM/Elt/A.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data A_ a - :: Event (Attribute A_) + :: Array (Event (Attribute A_)) -> Array Nut -> Nut a = DC.elementify2 "a" diff --git a/src/Deku/DOM/Elt/Abbr.purs b/src/Deku/DOM/Elt/Abbr.purs index e1f4762b..dde4f6d3 100644 --- a/src/Deku/DOM/Elt/Abbr.purs +++ b/src/Deku/DOM/Elt/Abbr.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Abbr_ abbr - :: Event (Attribute Abbr_) + :: Array (Event (Attribute Abbr_)) -> Array Nut -> Nut abbr = DC.elementify2 "abbr" diff --git a/src/Deku/DOM/Elt/Acronym.purs b/src/Deku/DOM/Elt/Acronym.purs index 398e9bc1..3165459f 100644 --- a/src/Deku/DOM/Elt/Acronym.purs +++ b/src/Deku/DOM/Elt/Acronym.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Acronym_ acronym - :: Event (Attribute Acronym_) + :: Array (Event (Attribute Acronym_)) -> Array Nut -> Nut acronym = DC.elementify2 "acronym" diff --git a/src/Deku/DOM/Elt/Address.purs b/src/Deku/DOM/Elt/Address.purs index caac6680..dd880d49 100644 --- a/src/Deku/DOM/Elt/Address.purs +++ b/src/Deku/DOM/Elt/Address.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Address_ address - :: Event (Attribute Address_) + :: Array (Event (Attribute Address_)) -> Array Nut -> Nut address = DC.elementify2 "address" diff --git a/src/Deku/DOM/Elt/Animate.purs b/src/Deku/DOM/Elt/Animate.purs index c09549b3..6543eeff 100644 --- a/src/Deku/DOM/Elt/Animate.purs +++ b/src/Deku/DOM/Elt/Animate.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Animate_ animate - :: Event (Attribute Animate_) + :: Array (Event (Attribute Animate_)) -> Array Nut -> Nut animate = DC.elementify2 "animate" diff --git a/src/Deku/DOM/Elt/AnimateMotion.purs b/src/Deku/DOM/Elt/AnimateMotion.purs index 7e5e1f07..c8f0d0fd 100644 --- a/src/Deku/DOM/Elt/AnimateMotion.purs +++ b/src/Deku/DOM/Elt/AnimateMotion.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data AnimateMotion_ animateMotion - :: Event (Attribute AnimateMotion_) + :: Array (Event (Attribute AnimateMotion_)) -> Array Nut -> Nut animateMotion = DC.elementify2 "animateMotion" diff --git a/src/Deku/DOM/Elt/AnimateTransform.purs b/src/Deku/DOM/Elt/AnimateTransform.purs index cd248af5..cbf50d9e 100644 --- a/src/Deku/DOM/Elt/AnimateTransform.purs +++ b/src/Deku/DOM/Elt/AnimateTransform.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data AnimateTransform_ animateTransform - :: Event (Attribute AnimateTransform_) + :: Array (Event (Attribute AnimateTransform_)) -> Array Nut -> Nut animateTransform = DC.elementify2 "animateTransform" diff --git a/src/Deku/DOM/Elt/Applet.purs b/src/Deku/DOM/Elt/Applet.purs index 336d6a7a..b37f9169 100644 --- a/src/Deku/DOM/Elt/Applet.purs +++ b/src/Deku/DOM/Elt/Applet.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Applet_ applet - :: Event (Attribute Applet_) + :: Array (Event (Attribute Applet_)) -> Array Nut -> Nut applet = DC.elementify2 "applet" diff --git a/src/Deku/DOM/Elt/Area.purs b/src/Deku/DOM/Elt/Area.purs index 4ae7fd2d..7253df07 100644 --- a/src/Deku/DOM/Elt/Area.purs +++ b/src/Deku/DOM/Elt/Area.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Area_ area - :: Event (Attribute Area_) + :: Array (Event (Attribute Area_)) -> Array Nut -> Nut area = DC.elementify2 "area" diff --git a/src/Deku/DOM/Elt/Article.purs b/src/Deku/DOM/Elt/Article.purs index 632df1d9..0a621922 100644 --- a/src/Deku/DOM/Elt/Article.purs +++ b/src/Deku/DOM/Elt/Article.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Article_ article - :: Event (Attribute Article_) + :: Array (Event (Attribute Article_)) -> Array Nut -> Nut article = DC.elementify2 "article" diff --git a/src/Deku/DOM/Elt/Aside.purs b/src/Deku/DOM/Elt/Aside.purs index 4d0b5425..6ed0cdc2 100644 --- a/src/Deku/DOM/Elt/Aside.purs +++ b/src/Deku/DOM/Elt/Aside.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Aside_ aside - :: Event (Attribute Aside_) + :: Array (Event (Attribute Aside_)) -> Array Nut -> Nut aside = DC.elementify2 "aside" diff --git a/src/Deku/DOM/Elt/Audio.purs b/src/Deku/DOM/Elt/Audio.purs index 53758437..e586abca 100644 --- a/src/Deku/DOM/Elt/Audio.purs +++ b/src/Deku/DOM/Elt/Audio.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Audio_ audio - :: Event (Attribute Audio_) + :: Array (Event (Attribute Audio_)) -> Array Nut -> Nut audio = DC.elementify2 "audio" diff --git a/src/Deku/DOM/Elt/B.purs b/src/Deku/DOM/Elt/B.purs index 05c6e0f7..18874476 100644 --- a/src/Deku/DOM/Elt/B.purs +++ b/src/Deku/DOM/Elt/B.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data B_ b - :: Event (Attribute B_) + :: Array (Event (Attribute B_)) -> Array Nut -> Nut b = DC.elementify2 "b" diff --git a/src/Deku/DOM/Elt/Base.purs b/src/Deku/DOM/Elt/Base.purs index c4f81055..23e226d0 100644 --- a/src/Deku/DOM/Elt/Base.purs +++ b/src/Deku/DOM/Elt/Base.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Base_ base - :: Event (Attribute Base_) + :: Array (Event (Attribute Base_)) -> Array Nut -> Nut base = DC.elementify2 "base" diff --git a/src/Deku/DOM/Elt/Basefont.purs b/src/Deku/DOM/Elt/Basefont.purs index 57805117..59c8845f 100644 --- a/src/Deku/DOM/Elt/Basefont.purs +++ b/src/Deku/DOM/Elt/Basefont.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Basefont_ basefont - :: Event (Attribute Basefont_) + :: Array (Event (Attribute Basefont_)) -> Array Nut -> Nut basefont = DC.elementify2 "basefont" diff --git a/src/Deku/DOM/Elt/Bdi.purs b/src/Deku/DOM/Elt/Bdi.purs index 9b90fd77..fa68d18d 100644 --- a/src/Deku/DOM/Elt/Bdi.purs +++ b/src/Deku/DOM/Elt/Bdi.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Bdi_ bdi - :: Event (Attribute Bdi_) + :: Array (Event (Attribute Bdi_)) -> Array Nut -> Nut bdi = DC.elementify2 "bdi" diff --git a/src/Deku/DOM/Elt/Bdo.purs b/src/Deku/DOM/Elt/Bdo.purs index ad7322fc..32b0e780 100644 --- a/src/Deku/DOM/Elt/Bdo.purs +++ b/src/Deku/DOM/Elt/Bdo.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Bdo_ bdo - :: Event (Attribute Bdo_) + :: Array (Event (Attribute Bdo_)) -> Array Nut -> Nut bdo = DC.elementify2 "bdo" diff --git a/src/Deku/DOM/Elt/Big.purs b/src/Deku/DOM/Elt/Big.purs index e23c59b9..76633a3f 100644 --- a/src/Deku/DOM/Elt/Big.purs +++ b/src/Deku/DOM/Elt/Big.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Big_ big - :: Event (Attribute Big_) + :: Array (Event (Attribute Big_)) -> Array Nut -> Nut big = DC.elementify2 "big" diff --git a/src/Deku/DOM/Elt/Blockquote.purs b/src/Deku/DOM/Elt/Blockquote.purs index 08d6d0fa..5547033f 100644 --- a/src/Deku/DOM/Elt/Blockquote.purs +++ b/src/Deku/DOM/Elt/Blockquote.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Blockquote_ blockquote - :: Event (Attribute Blockquote_) + :: Array (Event (Attribute Blockquote_)) -> Array Nut -> Nut blockquote = DC.elementify2 "blockquote" diff --git a/src/Deku/DOM/Elt/Body.purs b/src/Deku/DOM/Elt/Body.purs index 5ea0859c..d09a4b51 100644 --- a/src/Deku/DOM/Elt/Body.purs +++ b/src/Deku/DOM/Elt/Body.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Body_ body - :: Event (Attribute Body_) + :: Array (Event (Attribute Body_)) -> Array Nut -> Nut body = DC.elementify2 "body" diff --git a/src/Deku/DOM/Elt/Br.purs b/src/Deku/DOM/Elt/Br.purs index 7c48e309..2ac98f1b 100644 --- a/src/Deku/DOM/Elt/Br.purs +++ b/src/Deku/DOM/Elt/Br.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Br_ br - :: Event (Attribute Br_) + :: Array (Event (Attribute Br_)) -> Array Nut -> Nut br = DC.elementify2 "br" diff --git a/src/Deku/DOM/Elt/Button.purs b/src/Deku/DOM/Elt/Button.purs index 740facca..ebc95488 100644 --- a/src/Deku/DOM/Elt/Button.purs +++ b/src/Deku/DOM/Elt/Button.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Button_ button - :: Event (Attribute Button_) + :: Array (Event (Attribute Button_)) -> Array Nut -> Nut button = DC.elementify2 "button" diff --git a/src/Deku/DOM/Elt/Canvas.purs b/src/Deku/DOM/Elt/Canvas.purs index 907e34e0..b46820cf 100644 --- a/src/Deku/DOM/Elt/Canvas.purs +++ b/src/Deku/DOM/Elt/Canvas.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Canvas_ canvas - :: Event (Attribute Canvas_) + :: Array (Event (Attribute Canvas_)) -> Array Nut -> Nut canvas = DC.elementify2 "canvas" diff --git a/src/Deku/DOM/Elt/Caption.purs b/src/Deku/DOM/Elt/Caption.purs index 2362dcd4..ccadafd8 100644 --- a/src/Deku/DOM/Elt/Caption.purs +++ b/src/Deku/DOM/Elt/Caption.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Caption_ caption - :: Event (Attribute Caption_) + :: Array (Event (Attribute Caption_)) -> Array Nut -> Nut caption = DC.elementify2 "caption" diff --git a/src/Deku/DOM/Elt/Center.purs b/src/Deku/DOM/Elt/Center.purs index 39ee7338..b3d80952 100644 --- a/src/Deku/DOM/Elt/Center.purs +++ b/src/Deku/DOM/Elt/Center.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Center_ center - :: Event (Attribute Center_) + :: Array (Event (Attribute Center_)) -> Array Nut -> Nut center = DC.elementify2 "center" diff --git a/src/Deku/DOM/Elt/Circle.purs b/src/Deku/DOM/Elt/Circle.purs index acc103ed..92fd5561 100644 --- a/src/Deku/DOM/Elt/Circle.purs +++ b/src/Deku/DOM/Elt/Circle.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Circle_ circle - :: Event (Attribute Circle_) + :: Array (Event (Attribute Circle_)) -> Array Nut -> Nut circle = DC.elementify2 "circle" diff --git a/src/Deku/DOM/Elt/Cite.purs b/src/Deku/DOM/Elt/Cite.purs index bfd2a125..e6af2597 100644 --- a/src/Deku/DOM/Elt/Cite.purs +++ b/src/Deku/DOM/Elt/Cite.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Cite_ cite - :: Event (Attribute Cite_) + :: Array (Event (Attribute Cite_)) -> Array Nut -> Nut cite = DC.elementify2 "cite" diff --git a/src/Deku/DOM/Elt/ClipPath.purs b/src/Deku/DOM/Elt/ClipPath.purs index b418add1..ffaff4fa 100644 --- a/src/Deku/DOM/Elt/ClipPath.purs +++ b/src/Deku/DOM/Elt/ClipPath.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data ClipPath_ clipPath - :: Event (Attribute ClipPath_) + :: Array (Event (Attribute ClipPath_)) -> Array Nut -> Nut clipPath = DC.elementify2 "clipPath" diff --git a/src/Deku/DOM/Elt/Code.purs b/src/Deku/DOM/Elt/Code.purs index f80a14a9..4e5a1442 100644 --- a/src/Deku/DOM/Elt/Code.purs +++ b/src/Deku/DOM/Elt/Code.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Code_ code - :: Event (Attribute Code_) + :: Array (Event (Attribute Code_)) -> Array Nut -> Nut code = DC.elementify2 "code" diff --git a/src/Deku/DOM/Elt/Col.purs b/src/Deku/DOM/Elt/Col.purs index 8093a6ec..49f07dee 100644 --- a/src/Deku/DOM/Elt/Col.purs +++ b/src/Deku/DOM/Elt/Col.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Col_ col - :: Event (Attribute Col_) + :: Array (Event (Attribute Col_)) -> Array Nut -> Nut col = DC.elementify2 "col" diff --git a/src/Deku/DOM/Elt/Colgroup.purs b/src/Deku/DOM/Elt/Colgroup.purs index 9f6306af..f6ea3cec 100644 --- a/src/Deku/DOM/Elt/Colgroup.purs +++ b/src/Deku/DOM/Elt/Colgroup.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Colgroup_ colgroup - :: Event (Attribute Colgroup_) + :: Array (Event (Attribute Colgroup_)) -> Array Nut -> Nut colgroup = DC.elementify2 "colgroup" diff --git a/src/Deku/DOM/Elt/Datalist.purs b/src/Deku/DOM/Elt/Datalist.purs index e37f6933..815f530d 100644 --- a/src/Deku/DOM/Elt/Datalist.purs +++ b/src/Deku/DOM/Elt/Datalist.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Datalist_ datalist - :: Event (Attribute Datalist_) + :: Array (Event (Attribute Datalist_)) -> Array Nut -> Nut datalist = DC.elementify2 "datalist" diff --git a/src/Deku/DOM/Elt/Dd.purs b/src/Deku/DOM/Elt/Dd.purs index 7b26c0cf..4b1629cf 100644 --- a/src/Deku/DOM/Elt/Dd.purs +++ b/src/Deku/DOM/Elt/Dd.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dd_ dd - :: Event (Attribute Dd_) + :: Array (Event (Attribute Dd_)) -> Array Nut -> Nut dd = DC.elementify2 "dd" diff --git a/src/Deku/DOM/Elt/Defs.purs b/src/Deku/DOM/Elt/Defs.purs index d59e65d0..85ae14e7 100644 --- a/src/Deku/DOM/Elt/Defs.purs +++ b/src/Deku/DOM/Elt/Defs.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Defs_ defs - :: Event (Attribute Defs_) + :: Array (Event (Attribute Defs_)) -> Array Nut -> Nut defs = DC.elementify2 "defs" diff --git a/src/Deku/DOM/Elt/Del.purs b/src/Deku/DOM/Elt/Del.purs index 40404189..441af043 100644 --- a/src/Deku/DOM/Elt/Del.purs +++ b/src/Deku/DOM/Elt/Del.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Del_ del - :: Event (Attribute Del_) + :: Array (Event (Attribute Del_)) -> Array Nut -> Nut del = DC.elementify2 "del" diff --git a/src/Deku/DOM/Elt/Desc.purs b/src/Deku/DOM/Elt/Desc.purs index f0ff6719..2cfaeb57 100644 --- a/src/Deku/DOM/Elt/Desc.purs +++ b/src/Deku/DOM/Elt/Desc.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Desc_ desc - :: Event (Attribute Desc_) + :: Array (Event (Attribute Desc_)) -> Array Nut -> Nut desc = DC.elementify2 "desc" diff --git a/src/Deku/DOM/Elt/Details.purs b/src/Deku/DOM/Elt/Details.purs index e35c184f..ba2a1b36 100644 --- a/src/Deku/DOM/Elt/Details.purs +++ b/src/Deku/DOM/Elt/Details.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Details_ details - :: Event (Attribute Details_) + :: Array (Event (Attribute Details_)) -> Array Nut -> Nut details = DC.elementify2 "details" diff --git a/src/Deku/DOM/Elt/Dfn.purs b/src/Deku/DOM/Elt/Dfn.purs index f0ffc996..ed869661 100644 --- a/src/Deku/DOM/Elt/Dfn.purs +++ b/src/Deku/DOM/Elt/Dfn.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dfn_ dfn - :: Event (Attribute Dfn_) + :: Array (Event (Attribute Dfn_)) -> Array Nut -> Nut dfn = DC.elementify2 "dfn" diff --git a/src/Deku/DOM/Elt/Dialog.purs b/src/Deku/DOM/Elt/Dialog.purs index 8a671130..91ebf7b0 100644 --- a/src/Deku/DOM/Elt/Dialog.purs +++ b/src/Deku/DOM/Elt/Dialog.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dialog_ dialog - :: Event (Attribute Dialog_) + :: Array (Event (Attribute Dialog_)) -> Array Nut -> Nut dialog = DC.elementify2 "dialog" diff --git a/src/Deku/DOM/Elt/Dir.purs b/src/Deku/DOM/Elt/Dir.purs index 558a1847..16588e38 100644 --- a/src/Deku/DOM/Elt/Dir.purs +++ b/src/Deku/DOM/Elt/Dir.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dir_ dir - :: Event (Attribute Dir_) + :: Array (Event (Attribute Dir_)) -> Array Nut -> Nut dir = DC.elementify2 "dir" diff --git a/src/Deku/DOM/Elt/Discard.purs b/src/Deku/DOM/Elt/Discard.purs index 16fca626..7913f857 100644 --- a/src/Deku/DOM/Elt/Discard.purs +++ b/src/Deku/DOM/Elt/Discard.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Discard_ discard - :: Event (Attribute Discard_) + :: Array (Event (Attribute Discard_)) -> Array Nut -> Nut discard = DC.elementify2 "discard" diff --git a/src/Deku/DOM/Elt/Div.purs b/src/Deku/DOM/Elt/Div.purs index 5e2fbf64..4699fda2 100644 --- a/src/Deku/DOM/Elt/Div.purs +++ b/src/Deku/DOM/Elt/Div.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Div_ div - :: Event (Attribute Div_) + :: Array (Event (Attribute Div_)) -> Array Nut -> Nut div = DC.elementify2 "div" diff --git a/src/Deku/DOM/Elt/Dl.purs b/src/Deku/DOM/Elt/Dl.purs index f7b9a550..001b718f 100644 --- a/src/Deku/DOM/Elt/Dl.purs +++ b/src/Deku/DOM/Elt/Dl.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dl_ dl - :: Event (Attribute Dl_) + :: Array (Event (Attribute Dl_)) -> Array Nut -> Nut dl = DC.elementify2 "dl" diff --git a/src/Deku/DOM/Elt/Dt.purs b/src/Deku/DOM/Elt/Dt.purs index 4942235e..b2228031 100644 --- a/src/Deku/DOM/Elt/Dt.purs +++ b/src/Deku/DOM/Elt/Dt.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Dt_ dt - :: Event (Attribute Dt_) + :: Array (Event (Attribute Dt_)) -> Array Nut -> Nut dt = DC.elementify2 "dt" diff --git a/src/Deku/DOM/Elt/Ellipse.purs b/src/Deku/DOM/Elt/Ellipse.purs index 0d29fc89..4c1e7ad9 100644 --- a/src/Deku/DOM/Elt/Ellipse.purs +++ b/src/Deku/DOM/Elt/Ellipse.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Ellipse_ ellipse - :: Event (Attribute Ellipse_) + :: Array (Event (Attribute Ellipse_)) -> Array Nut -> Nut ellipse = DC.elementify2 "ellipse" diff --git a/src/Deku/DOM/Elt/Em.purs b/src/Deku/DOM/Elt/Em.purs index 105e515f..92b813a2 100644 --- a/src/Deku/DOM/Elt/Em.purs +++ b/src/Deku/DOM/Elt/Em.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Em_ em - :: Event (Attribute Em_) + :: Array (Event (Attribute Em_)) -> Array Nut -> Nut em = DC.elementify2 "em" diff --git a/src/Deku/DOM/Elt/Embed.purs b/src/Deku/DOM/Elt/Embed.purs index 76ada050..b6eb3c3e 100644 --- a/src/Deku/DOM/Elt/Embed.purs +++ b/src/Deku/DOM/Elt/Embed.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Embed_ embed - :: Event (Attribute Embed_) + :: Array (Event (Attribute Embed_)) -> Array Nut -> Nut embed = DC.elementify2 "embed" diff --git a/src/Deku/DOM/Elt/FeBlend.purs b/src/Deku/DOM/Elt/FeBlend.purs index 092fd68f..79a11e9c 100644 --- a/src/Deku/DOM/Elt/FeBlend.purs +++ b/src/Deku/DOM/Elt/FeBlend.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeBlend_ feBlend - :: Event (Attribute FeBlend_) + :: Array (Event (Attribute FeBlend_)) -> Array Nut -> Nut feBlend = DC.elementify2 "feBlend" diff --git a/src/Deku/DOM/Elt/FeColorMatrix.purs b/src/Deku/DOM/Elt/FeColorMatrix.purs index 3c462941..a421b342 100644 --- a/src/Deku/DOM/Elt/FeColorMatrix.purs +++ b/src/Deku/DOM/Elt/FeColorMatrix.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeColorMatrix_ feColorMatrix - :: Event (Attribute FeColorMatrix_) + :: Array (Event (Attribute FeColorMatrix_)) -> Array Nut -> Nut feColorMatrix = DC.elementify2 "feColorMatrix" diff --git a/src/Deku/DOM/Elt/FeComponentTransfer.purs b/src/Deku/DOM/Elt/FeComponentTransfer.purs index cf16ce3b..fa35eb69 100644 --- a/src/Deku/DOM/Elt/FeComponentTransfer.purs +++ b/src/Deku/DOM/Elt/FeComponentTransfer.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeComponentTransfer_ feComponentTransfer - :: Event (Attribute FeComponentTransfer_) + :: Array (Event (Attribute FeComponentTransfer_)) -> Array Nut -> Nut feComponentTransfer = DC.elementify2 "feComponentTransfer" diff --git a/src/Deku/DOM/Elt/FeComposite.purs b/src/Deku/DOM/Elt/FeComposite.purs index 79044041..f918d164 100644 --- a/src/Deku/DOM/Elt/FeComposite.purs +++ b/src/Deku/DOM/Elt/FeComposite.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeComposite_ feComposite - :: Event (Attribute FeComposite_) + :: Array (Event (Attribute FeComposite_)) -> Array Nut -> Nut feComposite = DC.elementify2 "feComposite" diff --git a/src/Deku/DOM/Elt/FeConvolveMatrix.purs b/src/Deku/DOM/Elt/FeConvolveMatrix.purs index 0217c9d9..06ad607e 100644 --- a/src/Deku/DOM/Elt/FeConvolveMatrix.purs +++ b/src/Deku/DOM/Elt/FeConvolveMatrix.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeConvolveMatrix_ feConvolveMatrix - :: Event (Attribute FeConvolveMatrix_) + :: Array (Event (Attribute FeConvolveMatrix_)) -> Array Nut -> Nut feConvolveMatrix = DC.elementify2 "feConvolveMatrix" diff --git a/src/Deku/DOM/Elt/FeDiffuseLighting.purs b/src/Deku/DOM/Elt/FeDiffuseLighting.purs index 65b7d154..24eaa1f7 100644 --- a/src/Deku/DOM/Elt/FeDiffuseLighting.purs +++ b/src/Deku/DOM/Elt/FeDiffuseLighting.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeDiffuseLighting_ feDiffuseLighting - :: Event (Attribute FeDiffuseLighting_) + :: Array (Event (Attribute FeDiffuseLighting_)) -> Array Nut -> Nut feDiffuseLighting = DC.elementify2 "feDiffuseLighting" diff --git a/src/Deku/DOM/Elt/FeDisplacementMap.purs b/src/Deku/DOM/Elt/FeDisplacementMap.purs index 098e87ed..f9aca16a 100644 --- a/src/Deku/DOM/Elt/FeDisplacementMap.purs +++ b/src/Deku/DOM/Elt/FeDisplacementMap.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeDisplacementMap_ feDisplacementMap - :: Event (Attribute FeDisplacementMap_) + :: Array (Event (Attribute FeDisplacementMap_)) -> Array Nut -> Nut feDisplacementMap = DC.elementify2 "feDisplacementMap" diff --git a/src/Deku/DOM/Elt/FeDistantLight.purs b/src/Deku/DOM/Elt/FeDistantLight.purs index e3e9a37f..968ff195 100644 --- a/src/Deku/DOM/Elt/FeDistantLight.purs +++ b/src/Deku/DOM/Elt/FeDistantLight.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeDistantLight_ feDistantLight - :: Event (Attribute FeDistantLight_) + :: Array (Event (Attribute FeDistantLight_)) -> Array Nut -> Nut feDistantLight = DC.elementify2 "feDistantLight" diff --git a/src/Deku/DOM/Elt/FeDropShadow.purs b/src/Deku/DOM/Elt/FeDropShadow.purs index 13e8ee7b..66b84cdd 100644 --- a/src/Deku/DOM/Elt/FeDropShadow.purs +++ b/src/Deku/DOM/Elt/FeDropShadow.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeDropShadow_ feDropShadow - :: Event (Attribute FeDropShadow_) + :: Array (Event (Attribute FeDropShadow_)) -> Array Nut -> Nut feDropShadow = DC.elementify2 "feDropShadow" diff --git a/src/Deku/DOM/Elt/FeFlood.purs b/src/Deku/DOM/Elt/FeFlood.purs index abf8615a..e7e97c84 100644 --- a/src/Deku/DOM/Elt/FeFlood.purs +++ b/src/Deku/DOM/Elt/FeFlood.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeFlood_ feFlood - :: Event (Attribute FeFlood_) + :: Array (Event (Attribute FeFlood_)) -> Array Nut -> Nut feFlood = DC.elementify2 "feFlood" diff --git a/src/Deku/DOM/Elt/FeFuncA.purs b/src/Deku/DOM/Elt/FeFuncA.purs index 429bb57e..1c1e7383 100644 --- a/src/Deku/DOM/Elt/FeFuncA.purs +++ b/src/Deku/DOM/Elt/FeFuncA.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeFuncA_ feFuncA - :: Event (Attribute FeFuncA_) + :: Array (Event (Attribute FeFuncA_)) -> Array Nut -> Nut feFuncA = DC.elementify2 "feFuncA" diff --git a/src/Deku/DOM/Elt/FeFuncB.purs b/src/Deku/DOM/Elt/FeFuncB.purs index 449b5d78..79b7a8ea 100644 --- a/src/Deku/DOM/Elt/FeFuncB.purs +++ b/src/Deku/DOM/Elt/FeFuncB.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeFuncB_ feFuncB - :: Event (Attribute FeFuncB_) + :: Array (Event (Attribute FeFuncB_)) -> Array Nut -> Nut feFuncB = DC.elementify2 "feFuncB" diff --git a/src/Deku/DOM/Elt/FeFuncG.purs b/src/Deku/DOM/Elt/FeFuncG.purs index d976ea1f..dca9429e 100644 --- a/src/Deku/DOM/Elt/FeFuncG.purs +++ b/src/Deku/DOM/Elt/FeFuncG.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeFuncG_ feFuncG - :: Event (Attribute FeFuncG_) + :: Array (Event (Attribute FeFuncG_)) -> Array Nut -> Nut feFuncG = DC.elementify2 "feFuncG" diff --git a/src/Deku/DOM/Elt/FeFuncR.purs b/src/Deku/DOM/Elt/FeFuncR.purs index abcb43d1..d239b312 100644 --- a/src/Deku/DOM/Elt/FeFuncR.purs +++ b/src/Deku/DOM/Elt/FeFuncR.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeFuncR_ feFuncR - :: Event (Attribute FeFuncR_) + :: Array (Event (Attribute FeFuncR_)) -> Array Nut -> Nut feFuncR = DC.elementify2 "feFuncR" diff --git a/src/Deku/DOM/Elt/FeGaussianBlur.purs b/src/Deku/DOM/Elt/FeGaussianBlur.purs index dacadcd6..e3cb0d1b 100644 --- a/src/Deku/DOM/Elt/FeGaussianBlur.purs +++ b/src/Deku/DOM/Elt/FeGaussianBlur.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeGaussianBlur_ feGaussianBlur - :: Event (Attribute FeGaussianBlur_) + :: Array (Event (Attribute FeGaussianBlur_)) -> Array Nut -> Nut feGaussianBlur = DC.elementify2 "feGaussianBlur" diff --git a/src/Deku/DOM/Elt/FeImage.purs b/src/Deku/DOM/Elt/FeImage.purs index 3b9ad56e..25725b6f 100644 --- a/src/Deku/DOM/Elt/FeImage.purs +++ b/src/Deku/DOM/Elt/FeImage.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeImage_ feImage - :: Event (Attribute FeImage_) + :: Array (Event (Attribute FeImage_)) -> Array Nut -> Nut feImage = DC.elementify2 "feImage" diff --git a/src/Deku/DOM/Elt/FeMerge.purs b/src/Deku/DOM/Elt/FeMerge.purs index 1a4d996d..53e724e4 100644 --- a/src/Deku/DOM/Elt/FeMerge.purs +++ b/src/Deku/DOM/Elt/FeMerge.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeMerge_ feMerge - :: Event (Attribute FeMerge_) + :: Array (Event (Attribute FeMerge_)) -> Array Nut -> Nut feMerge = DC.elementify2 "feMerge" diff --git a/src/Deku/DOM/Elt/FeMergeNode.purs b/src/Deku/DOM/Elt/FeMergeNode.purs index 697c8c26..e29a1a22 100644 --- a/src/Deku/DOM/Elt/FeMergeNode.purs +++ b/src/Deku/DOM/Elt/FeMergeNode.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeMergeNode_ feMergeNode - :: Event (Attribute FeMergeNode_) + :: Array (Event (Attribute FeMergeNode_)) -> Array Nut -> Nut feMergeNode = DC.elementify2 "feMergeNode" diff --git a/src/Deku/DOM/Elt/FeMorphology.purs b/src/Deku/DOM/Elt/FeMorphology.purs index 943deaf2..4d2f51a6 100644 --- a/src/Deku/DOM/Elt/FeMorphology.purs +++ b/src/Deku/DOM/Elt/FeMorphology.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeMorphology_ feMorphology - :: Event (Attribute FeMorphology_) + :: Array (Event (Attribute FeMorphology_)) -> Array Nut -> Nut feMorphology = DC.elementify2 "feMorphology" diff --git a/src/Deku/DOM/Elt/FeOffset.purs b/src/Deku/DOM/Elt/FeOffset.purs index 12f9e6a8..70e4057c 100644 --- a/src/Deku/DOM/Elt/FeOffset.purs +++ b/src/Deku/DOM/Elt/FeOffset.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeOffset_ feOffset - :: Event (Attribute FeOffset_) + :: Array (Event (Attribute FeOffset_)) -> Array Nut -> Nut feOffset = DC.elementify2 "feOffset" diff --git a/src/Deku/DOM/Elt/FePointLight.purs b/src/Deku/DOM/Elt/FePointLight.purs index 2d1419d6..f3b7f3c9 100644 --- a/src/Deku/DOM/Elt/FePointLight.purs +++ b/src/Deku/DOM/Elt/FePointLight.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FePointLight_ fePointLight - :: Event (Attribute FePointLight_) + :: Array (Event (Attribute FePointLight_)) -> Array Nut -> Nut fePointLight = DC.elementify2 "fePointLight" diff --git a/src/Deku/DOM/Elt/FeSpecularLighting.purs b/src/Deku/DOM/Elt/FeSpecularLighting.purs index 8f55cf0f..bac629a9 100644 --- a/src/Deku/DOM/Elt/FeSpecularLighting.purs +++ b/src/Deku/DOM/Elt/FeSpecularLighting.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeSpecularLighting_ feSpecularLighting - :: Event (Attribute FeSpecularLighting_) + :: Array (Event (Attribute FeSpecularLighting_)) -> Array Nut -> Nut feSpecularLighting = DC.elementify2 "feSpecularLighting" diff --git a/src/Deku/DOM/Elt/FeSpotLight.purs b/src/Deku/DOM/Elt/FeSpotLight.purs index 3bdd00f6..b30a8a46 100644 --- a/src/Deku/DOM/Elt/FeSpotLight.purs +++ b/src/Deku/DOM/Elt/FeSpotLight.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeSpotLight_ feSpotLight - :: Event (Attribute FeSpotLight_) + :: Array (Event (Attribute FeSpotLight_)) -> Array Nut -> Nut feSpotLight = DC.elementify2 "feSpotLight" diff --git a/src/Deku/DOM/Elt/FeTile.purs b/src/Deku/DOM/Elt/FeTile.purs index 4d64e908..37fc447e 100644 --- a/src/Deku/DOM/Elt/FeTile.purs +++ b/src/Deku/DOM/Elt/FeTile.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeTile_ feTile - :: Event (Attribute FeTile_) + :: Array (Event (Attribute FeTile_)) -> Array Nut -> Nut feTile = DC.elementify2 "feTile" diff --git a/src/Deku/DOM/Elt/FeTurbulence.purs b/src/Deku/DOM/Elt/FeTurbulence.purs index 34771d4c..febc7d54 100644 --- a/src/Deku/DOM/Elt/FeTurbulence.purs +++ b/src/Deku/DOM/Elt/FeTurbulence.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data FeTurbulence_ feTurbulence - :: Event (Attribute FeTurbulence_) + :: Array (Event (Attribute FeTurbulence_)) -> Array Nut -> Nut feTurbulence = DC.elementify2 "feTurbulence" diff --git a/src/Deku/DOM/Elt/Fieldset.purs b/src/Deku/DOM/Elt/Fieldset.purs index 2fcc39b6..76532cad 100644 --- a/src/Deku/DOM/Elt/Fieldset.purs +++ b/src/Deku/DOM/Elt/Fieldset.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Fieldset_ fieldset - :: Event (Attribute Fieldset_) + :: Array (Event (Attribute Fieldset_)) -> Array Nut -> Nut fieldset = DC.elementify2 "fieldset" diff --git a/src/Deku/DOM/Elt/Figcaption.purs b/src/Deku/DOM/Elt/Figcaption.purs index b1036295..e5e07e76 100644 --- a/src/Deku/DOM/Elt/Figcaption.purs +++ b/src/Deku/DOM/Elt/Figcaption.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Figcaption_ figcaption - :: Event (Attribute Figcaption_) + :: Array (Event (Attribute Figcaption_)) -> Array Nut -> Nut figcaption = DC.elementify2 "figcaption" diff --git a/src/Deku/DOM/Elt/Figure.purs b/src/Deku/DOM/Elt/Figure.purs index 46e0205c..5a3118bf 100644 --- a/src/Deku/DOM/Elt/Figure.purs +++ b/src/Deku/DOM/Elt/Figure.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Figure_ figure - :: Event (Attribute Figure_) + :: Array (Event (Attribute Figure_)) -> Array Nut -> Nut figure = DC.elementify2 "figure" diff --git a/src/Deku/DOM/Elt/Filter.purs b/src/Deku/DOM/Elt/Filter.purs index 69c51d06..e683b29d 100644 --- a/src/Deku/DOM/Elt/Filter.purs +++ b/src/Deku/DOM/Elt/Filter.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Filter_ filter - :: Event (Attribute Filter_) + :: Array (Event (Attribute Filter_)) -> Array Nut -> Nut filter = DC.elementify2 "filter" diff --git a/src/Deku/DOM/Elt/Font.purs b/src/Deku/DOM/Elt/Font.purs index bb5fea2f..8c12442b 100644 --- a/src/Deku/DOM/Elt/Font.purs +++ b/src/Deku/DOM/Elt/Font.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Font_ font - :: Event (Attribute Font_) + :: Array (Event (Attribute Font_)) -> Array Nut -> Nut font = DC.elementify2 "font" diff --git a/src/Deku/DOM/Elt/Footer.purs b/src/Deku/DOM/Elt/Footer.purs index 22cb6395..b189ab3f 100644 --- a/src/Deku/DOM/Elt/Footer.purs +++ b/src/Deku/DOM/Elt/Footer.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Footer_ footer - :: Event (Attribute Footer_) + :: Array (Event (Attribute Footer_)) -> Array Nut -> Nut footer = DC.elementify2 "footer" diff --git a/src/Deku/DOM/Elt/ForeignObject.purs b/src/Deku/DOM/Elt/ForeignObject.purs index 90210d61..7fda3324 100644 --- a/src/Deku/DOM/Elt/ForeignObject.purs +++ b/src/Deku/DOM/Elt/ForeignObject.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data ForeignObject_ foreignObject - :: Event (Attribute ForeignObject_) + :: Array (Event (Attribute ForeignObject_)) -> Array Nut -> Nut foreignObject = DC.elementify2 "foreignObject" diff --git a/src/Deku/DOM/Elt/Form.purs b/src/Deku/DOM/Elt/Form.purs index a90deba0..5c4c992b 100644 --- a/src/Deku/DOM/Elt/Form.purs +++ b/src/Deku/DOM/Elt/Form.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Form_ form - :: Event (Attribute Form_) + :: Array (Event (Attribute Form_)) -> Array Nut -> Nut form = DC.elementify2 "form" diff --git a/src/Deku/DOM/Elt/Frame.purs b/src/Deku/DOM/Elt/Frame.purs index 77eb0d13..dc262c26 100644 --- a/src/Deku/DOM/Elt/Frame.purs +++ b/src/Deku/DOM/Elt/Frame.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Frame_ frame - :: Event (Attribute Frame_) + :: Array (Event (Attribute Frame_)) -> Array Nut -> Nut frame = DC.elementify2 "frame" diff --git a/src/Deku/DOM/Elt/Frameset.purs b/src/Deku/DOM/Elt/Frameset.purs index 46b9009e..0fb9414b 100644 --- a/src/Deku/DOM/Elt/Frameset.purs +++ b/src/Deku/DOM/Elt/Frameset.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Frameset_ frameset - :: Event (Attribute Frameset_) + :: Array (Event (Attribute Frameset_)) -> Array Nut -> Nut frameset = DC.elementify2 "frameset" diff --git a/src/Deku/DOM/Elt/G.purs b/src/Deku/DOM/Elt/G.purs index 4624a705..87b9b246 100644 --- a/src/Deku/DOM/Elt/G.purs +++ b/src/Deku/DOM/Elt/G.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data G_ g - :: Event (Attribute G_) + :: Array (Event (Attribute G_)) -> Array Nut -> Nut g = DC.elementify2 "g" diff --git a/src/Deku/DOM/Elt/H1.purs b/src/Deku/DOM/Elt/H1.purs index 74b65885..93381a8a 100644 --- a/src/Deku/DOM/Elt/H1.purs +++ b/src/Deku/DOM/Elt/H1.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H1_ h1 - :: Event (Attribute H1_) + :: Array (Event (Attribute H1_)) -> Array Nut -> Nut h1 = DC.elementify2 "h1" diff --git a/src/Deku/DOM/Elt/H2.purs b/src/Deku/DOM/Elt/H2.purs index 54faf577..2b7062e0 100644 --- a/src/Deku/DOM/Elt/H2.purs +++ b/src/Deku/DOM/Elt/H2.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H2_ h2 - :: Event (Attribute H2_) + :: Array (Event (Attribute H2_)) -> Array Nut -> Nut h2 = DC.elementify2 "h2" diff --git a/src/Deku/DOM/Elt/H3.purs b/src/Deku/DOM/Elt/H3.purs index 4f087d2c..3f6db16b 100644 --- a/src/Deku/DOM/Elt/H3.purs +++ b/src/Deku/DOM/Elt/H3.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H3_ h3 - :: Event (Attribute H3_) + :: Array (Event (Attribute H3_)) -> Array Nut -> Nut h3 = DC.elementify2 "h3" diff --git a/src/Deku/DOM/Elt/H4.purs b/src/Deku/DOM/Elt/H4.purs index 54bcefa5..c20c79ab 100644 --- a/src/Deku/DOM/Elt/H4.purs +++ b/src/Deku/DOM/Elt/H4.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H4_ h4 - :: Event (Attribute H4_) + :: Array (Event (Attribute H4_)) -> Array Nut -> Nut h4 = DC.elementify2 "h4" diff --git a/src/Deku/DOM/Elt/H5.purs b/src/Deku/DOM/Elt/H5.purs index 8d00c707..325bb152 100644 --- a/src/Deku/DOM/Elt/H5.purs +++ b/src/Deku/DOM/Elt/H5.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H5_ h5 - :: Event (Attribute H5_) + :: Array (Event (Attribute H5_)) -> Array Nut -> Nut h5 = DC.elementify2 "h5" diff --git a/src/Deku/DOM/Elt/H6.purs b/src/Deku/DOM/Elt/H6.purs index dcb1cc67..c86ecca1 100644 --- a/src/Deku/DOM/Elt/H6.purs +++ b/src/Deku/DOM/Elt/H6.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data H6_ h6 - :: Event (Attribute H6_) + :: Array (Event (Attribute H6_)) -> Array Nut -> Nut h6 = DC.elementify2 "h6" diff --git a/src/Deku/DOM/Elt/Head.purs b/src/Deku/DOM/Elt/Head.purs index e9e5ba06..ae933dca 100644 --- a/src/Deku/DOM/Elt/Head.purs +++ b/src/Deku/DOM/Elt/Head.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Head_ head - :: Event (Attribute Head_) + :: Array (Event (Attribute Head_)) -> Array Nut -> Nut head = DC.elementify2 "head" diff --git a/src/Deku/DOM/Elt/Header.purs b/src/Deku/DOM/Elt/Header.purs index a5b8ffde..d0047c90 100644 --- a/src/Deku/DOM/Elt/Header.purs +++ b/src/Deku/DOM/Elt/Header.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Header_ header - :: Event (Attribute Header_) + :: Array (Event (Attribute Header_)) -> Array Nut -> Nut header = DC.elementify2 "header" diff --git a/src/Deku/DOM/Elt/Hr.purs b/src/Deku/DOM/Elt/Hr.purs index 1fcd8908..5df38a1c 100644 --- a/src/Deku/DOM/Elt/Hr.purs +++ b/src/Deku/DOM/Elt/Hr.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Hr_ hr - :: Event (Attribute Hr_) + :: Array (Event (Attribute Hr_)) -> Array Nut -> Nut hr = DC.elementify2 "hr" diff --git a/src/Deku/DOM/Elt/Html.purs b/src/Deku/DOM/Elt/Html.purs index 8967fa77..a84417eb 100644 --- a/src/Deku/DOM/Elt/Html.purs +++ b/src/Deku/DOM/Elt/Html.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Html_ html - :: Event (Attribute Html_) + :: Array (Event (Attribute Html_)) -> Array Nut -> Nut html = DC.elementify2 "html" diff --git a/src/Deku/DOM/Elt/I.purs b/src/Deku/DOM/Elt/I.purs index 212d59ec..34d7d341 100644 --- a/src/Deku/DOM/Elt/I.purs +++ b/src/Deku/DOM/Elt/I.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data I_ i - :: Event (Attribute I_) + :: Array (Event (Attribute I_)) -> Array Nut -> Nut i = DC.elementify2 "i" diff --git a/src/Deku/DOM/Elt/Iframe.purs b/src/Deku/DOM/Elt/Iframe.purs index d9846729..c80ad9a6 100644 --- a/src/Deku/DOM/Elt/Iframe.purs +++ b/src/Deku/DOM/Elt/Iframe.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Iframe_ iframe - :: Event (Attribute Iframe_) + :: Array (Event (Attribute Iframe_)) -> Array Nut -> Nut iframe = DC.elementify2 "iframe" diff --git a/src/Deku/DOM/Elt/Image.purs b/src/Deku/DOM/Elt/Image.purs index d452ce6a..dc2dc613 100644 --- a/src/Deku/DOM/Elt/Image.purs +++ b/src/Deku/DOM/Elt/Image.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Image_ image - :: Event (Attribute Image_) + :: Array (Event (Attribute Image_)) -> Array Nut -> Nut image = DC.elementify2 "image" diff --git a/src/Deku/DOM/Elt/Img.purs b/src/Deku/DOM/Elt/Img.purs index 39795a9a..3703c779 100644 --- a/src/Deku/DOM/Elt/Img.purs +++ b/src/Deku/DOM/Elt/Img.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Img_ img - :: Event (Attribute Img_) + :: Array (Event (Attribute Img_)) -> Array Nut -> Nut img = DC.elementify2 "img" diff --git a/src/Deku/DOM/Elt/Input.purs b/src/Deku/DOM/Elt/Input.purs index 41ffcf15..a405fba1 100644 --- a/src/Deku/DOM/Elt/Input.purs +++ b/src/Deku/DOM/Elt/Input.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Input_ input - :: Event (Attribute Input_) + :: Array (Event (Attribute Input_)) -> Array Nut -> Nut input = DC.elementify2 "input" diff --git a/src/Deku/DOM/Elt/Ins.purs b/src/Deku/DOM/Elt/Ins.purs index 45101239..2925fe92 100644 --- a/src/Deku/DOM/Elt/Ins.purs +++ b/src/Deku/DOM/Elt/Ins.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Ins_ ins - :: Event (Attribute Ins_) + :: Array (Event (Attribute Ins_)) -> Array Nut -> Nut ins = DC.elementify2 "ins" diff --git a/src/Deku/DOM/Elt/Kbd.purs b/src/Deku/DOM/Elt/Kbd.purs index 52c5afaf..811ed51c 100644 --- a/src/Deku/DOM/Elt/Kbd.purs +++ b/src/Deku/DOM/Elt/Kbd.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Kbd_ kbd - :: Event (Attribute Kbd_) + :: Array (Event (Attribute Kbd_)) -> Array Nut -> Nut kbd = DC.elementify2 "kbd" diff --git a/src/Deku/DOM/Elt/Label.purs b/src/Deku/DOM/Elt/Label.purs index fb7b5216..79ad1a55 100644 --- a/src/Deku/DOM/Elt/Label.purs +++ b/src/Deku/DOM/Elt/Label.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Label_ label - :: Event (Attribute Label_) + :: Array (Event (Attribute Label_)) -> Array Nut -> Nut label = DC.elementify2 "label" diff --git a/src/Deku/DOM/Elt/Legend.purs b/src/Deku/DOM/Elt/Legend.purs index ac0cf1da..e0ba6a72 100644 --- a/src/Deku/DOM/Elt/Legend.purs +++ b/src/Deku/DOM/Elt/Legend.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Legend_ legend - :: Event (Attribute Legend_) + :: Array (Event (Attribute Legend_)) -> Array Nut -> Nut legend = DC.elementify2 "legend" diff --git a/src/Deku/DOM/Elt/Li.purs b/src/Deku/DOM/Elt/Li.purs index 07d9d09f..ad17bd49 100644 --- a/src/Deku/DOM/Elt/Li.purs +++ b/src/Deku/DOM/Elt/Li.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Li_ li - :: Event (Attribute Li_) + :: Array (Event (Attribute Li_)) -> Array Nut -> Nut li = DC.elementify2 "li" diff --git a/src/Deku/DOM/Elt/Line.purs b/src/Deku/DOM/Elt/Line.purs index 12e52811..1fd54df0 100644 --- a/src/Deku/DOM/Elt/Line.purs +++ b/src/Deku/DOM/Elt/Line.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Line_ line - :: Event (Attribute Line_) + :: Array (Event (Attribute Line_)) -> Array Nut -> Nut line = DC.elementify2 "line" diff --git a/src/Deku/DOM/Elt/LinearGradient.purs b/src/Deku/DOM/Elt/LinearGradient.purs index 4aa83ecf..10a41a98 100644 --- a/src/Deku/DOM/Elt/LinearGradient.purs +++ b/src/Deku/DOM/Elt/LinearGradient.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data LinearGradient_ linearGradient - :: Event (Attribute LinearGradient_) + :: Array (Event (Attribute LinearGradient_)) -> Array Nut -> Nut linearGradient = DC.elementify2 "linearGradient" diff --git a/src/Deku/DOM/Elt/Link.purs b/src/Deku/DOM/Elt/Link.purs index 8cd6e5fd..7ab4d1ff 100644 --- a/src/Deku/DOM/Elt/Link.purs +++ b/src/Deku/DOM/Elt/Link.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Link_ link - :: Event (Attribute Link_) + :: Array (Event (Attribute Link_)) -> Array Nut -> Nut link = DC.elementify2 "link" diff --git a/src/Deku/DOM/Elt/Main.purs b/src/Deku/DOM/Elt/Main.purs index 44ccd8ae..5425f79c 100644 --- a/src/Deku/DOM/Elt/Main.purs +++ b/src/Deku/DOM/Elt/Main.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Main_ main - :: Event (Attribute Main_) + :: Array (Event (Attribute Main_)) -> Array Nut -> Nut main = DC.elementify2 "main" diff --git a/src/Deku/DOM/Elt/Map.purs b/src/Deku/DOM/Elt/Map.purs index 3f2bab3a..2455635e 100644 --- a/src/Deku/DOM/Elt/Map.purs +++ b/src/Deku/DOM/Elt/Map.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Map_ map - :: Event (Attribute Map_) + :: Array (Event (Attribute Map_)) -> Array Nut -> Nut map = DC.elementify2 "map" diff --git a/src/Deku/DOM/Elt/Mark.purs b/src/Deku/DOM/Elt/Mark.purs index eb5a948f..9b34a644 100644 --- a/src/Deku/DOM/Elt/Mark.purs +++ b/src/Deku/DOM/Elt/Mark.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Mark_ mark - :: Event (Attribute Mark_) + :: Array (Event (Attribute Mark_)) -> Array Nut -> Nut mark = DC.elementify2 "mark" diff --git a/src/Deku/DOM/Elt/Marker.purs b/src/Deku/DOM/Elt/Marker.purs index 09516cf9..5468031f 100644 --- a/src/Deku/DOM/Elt/Marker.purs +++ b/src/Deku/DOM/Elt/Marker.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Marker_ marker - :: Event (Attribute Marker_) + :: Array (Event (Attribute Marker_)) -> Array Nut -> Nut marker = DC.elementify2 "marker" diff --git a/src/Deku/DOM/Elt/Mask.purs b/src/Deku/DOM/Elt/Mask.purs index 660e1b5c..b73c3668 100644 --- a/src/Deku/DOM/Elt/Mask.purs +++ b/src/Deku/DOM/Elt/Mask.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Mask_ mask - :: Event (Attribute Mask_) + :: Array (Event (Attribute Mask_)) -> Array Nut -> Nut mask = DC.elementify2 "mask" diff --git a/src/Deku/DOM/Elt/Meta.purs b/src/Deku/DOM/Elt/Meta.purs index 0925870d..269c31b9 100644 --- a/src/Deku/DOM/Elt/Meta.purs +++ b/src/Deku/DOM/Elt/Meta.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Meta_ meta - :: Event (Attribute Meta_) + :: Array (Event (Attribute Meta_)) -> Array Nut -> Nut meta = DC.elementify2 "meta" diff --git a/src/Deku/DOM/Elt/Metadata.purs b/src/Deku/DOM/Elt/Metadata.purs index 463ea3b6..2c83de88 100644 --- a/src/Deku/DOM/Elt/Metadata.purs +++ b/src/Deku/DOM/Elt/Metadata.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Metadata_ metadata - :: Event (Attribute Metadata_) + :: Array (Event (Attribute Metadata_)) -> Array Nut -> Nut metadata = DC.elementify2 "metadata" diff --git a/src/Deku/DOM/Elt/Meter.purs b/src/Deku/DOM/Elt/Meter.purs index 6e79e4d2..ba08e4e1 100644 --- a/src/Deku/DOM/Elt/Meter.purs +++ b/src/Deku/DOM/Elt/Meter.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Meter_ meter - :: Event (Attribute Meter_) + :: Array (Event (Attribute Meter_)) -> Array Nut -> Nut meter = DC.elementify2 "meter" diff --git a/src/Deku/DOM/Elt/Mpath.purs b/src/Deku/DOM/Elt/Mpath.purs index 882e3147..8f8a4941 100644 --- a/src/Deku/DOM/Elt/Mpath.purs +++ b/src/Deku/DOM/Elt/Mpath.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Mpath_ mpath - :: Event (Attribute Mpath_) + :: Array (Event (Attribute Mpath_)) -> Array Nut -> Nut mpath = DC.elementify2 "mpath" diff --git a/src/Deku/DOM/Elt/Nav.purs b/src/Deku/DOM/Elt/Nav.purs index ce7628ff..55de2acb 100644 --- a/src/Deku/DOM/Elt/Nav.purs +++ b/src/Deku/DOM/Elt/Nav.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Nav_ nav - :: Event (Attribute Nav_) + :: Array (Event (Attribute Nav_)) -> Array Nut -> Nut nav = DC.elementify2 "nav" diff --git a/src/Deku/DOM/Elt/Noframes.purs b/src/Deku/DOM/Elt/Noframes.purs index f7004550..8be4bb3d 100644 --- a/src/Deku/DOM/Elt/Noframes.purs +++ b/src/Deku/DOM/Elt/Noframes.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Noframes_ noframes - :: Event (Attribute Noframes_) + :: Array (Event (Attribute Noframes_)) -> Array Nut -> Nut noframes = DC.elementify2 "noframes" diff --git a/src/Deku/DOM/Elt/Noscript.purs b/src/Deku/DOM/Elt/Noscript.purs index 550e1833..7fce8d3c 100644 --- a/src/Deku/DOM/Elt/Noscript.purs +++ b/src/Deku/DOM/Elt/Noscript.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Noscript_ noscript - :: Event (Attribute Noscript_) + :: Array (Event (Attribute Noscript_)) -> Array Nut -> Nut noscript = DC.elementify2 "noscript" diff --git a/src/Deku/DOM/Elt/Object.purs b/src/Deku/DOM/Elt/Object.purs index 67fd1038..139aac38 100644 --- a/src/Deku/DOM/Elt/Object.purs +++ b/src/Deku/DOM/Elt/Object.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Object_ object - :: Event (Attribute Object_) + :: Array (Event (Attribute Object_)) -> Array Nut -> Nut object = DC.elementify2 "object" diff --git a/src/Deku/DOM/Elt/Ol.purs b/src/Deku/DOM/Elt/Ol.purs index 5e723622..fd9b1e01 100644 --- a/src/Deku/DOM/Elt/Ol.purs +++ b/src/Deku/DOM/Elt/Ol.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Ol_ ol - :: Event (Attribute Ol_) + :: Array (Event (Attribute Ol_)) -> Array Nut -> Nut ol = DC.elementify2 "ol" diff --git a/src/Deku/DOM/Elt/Optgroup.purs b/src/Deku/DOM/Elt/Optgroup.purs index 1617e8b4..575f0761 100644 --- a/src/Deku/DOM/Elt/Optgroup.purs +++ b/src/Deku/DOM/Elt/Optgroup.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Optgroup_ optgroup - :: Event (Attribute Optgroup_) + :: Array (Event (Attribute Optgroup_)) -> Array Nut -> Nut optgroup = DC.elementify2 "optgroup" diff --git a/src/Deku/DOM/Elt/Option.purs b/src/Deku/DOM/Elt/Option.purs index d9c1b716..010cd95e 100644 --- a/src/Deku/DOM/Elt/Option.purs +++ b/src/Deku/DOM/Elt/Option.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Option_ option - :: Event (Attribute Option_) + :: Array (Event (Attribute Option_)) -> Array Nut -> Nut option = DC.elementify2 "option" diff --git a/src/Deku/DOM/Elt/Output.purs b/src/Deku/DOM/Elt/Output.purs index e6caae19..7a0da386 100644 --- a/src/Deku/DOM/Elt/Output.purs +++ b/src/Deku/DOM/Elt/Output.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Output_ output - :: Event (Attribute Output_) + :: Array (Event (Attribute Output_)) -> Array Nut -> Nut output = DC.elementify2 "output" diff --git a/src/Deku/DOM/Elt/P.purs b/src/Deku/DOM/Elt/P.purs index 7672dfa2..6b3d3d5b 100644 --- a/src/Deku/DOM/Elt/P.purs +++ b/src/Deku/DOM/Elt/P.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data P_ p - :: Event (Attribute P_) + :: Array (Event (Attribute P_)) -> Array Nut -> Nut p = DC.elementify2 "p" diff --git a/src/Deku/DOM/Elt/Param.purs b/src/Deku/DOM/Elt/Param.purs index 262f0033..d8fbbcb0 100644 --- a/src/Deku/DOM/Elt/Param.purs +++ b/src/Deku/DOM/Elt/Param.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Param_ param - :: Event (Attribute Param_) + :: Array (Event (Attribute Param_)) -> Array Nut -> Nut param = DC.elementify2 "param" diff --git a/src/Deku/DOM/Elt/Path.purs b/src/Deku/DOM/Elt/Path.purs index e80b6ef5..bef67016 100644 --- a/src/Deku/DOM/Elt/Path.purs +++ b/src/Deku/DOM/Elt/Path.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Path_ path - :: Event (Attribute Path_) + :: Array (Event (Attribute Path_)) -> Array Nut -> Nut path = DC.elementify2 "path" diff --git a/src/Deku/DOM/Elt/Pattern.purs b/src/Deku/DOM/Elt/Pattern.purs index 64d5a23e..5cbefc43 100644 --- a/src/Deku/DOM/Elt/Pattern.purs +++ b/src/Deku/DOM/Elt/Pattern.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Pattern_ pattern - :: Event (Attribute Pattern_) + :: Array (Event (Attribute Pattern_)) -> Array Nut -> Nut pattern = DC.elementify2 "pattern" diff --git a/src/Deku/DOM/Elt/Picture.purs b/src/Deku/DOM/Elt/Picture.purs index c0560529..4e1ca908 100644 --- a/src/Deku/DOM/Elt/Picture.purs +++ b/src/Deku/DOM/Elt/Picture.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Picture_ picture - :: Event (Attribute Picture_) + :: Array (Event (Attribute Picture_)) -> Array Nut -> Nut picture = DC.elementify2 "picture" diff --git a/src/Deku/DOM/Elt/Polygon.purs b/src/Deku/DOM/Elt/Polygon.purs index 5ed37e34..eff41079 100644 --- a/src/Deku/DOM/Elt/Polygon.purs +++ b/src/Deku/DOM/Elt/Polygon.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Polygon_ polygon - :: Event (Attribute Polygon_) + :: Array (Event (Attribute Polygon_)) -> Array Nut -> Nut polygon = DC.elementify2 "polygon" diff --git a/src/Deku/DOM/Elt/Polyline.purs b/src/Deku/DOM/Elt/Polyline.purs index 6584093a..46d9a676 100644 --- a/src/Deku/DOM/Elt/Polyline.purs +++ b/src/Deku/DOM/Elt/Polyline.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Polyline_ polyline - :: Event (Attribute Polyline_) + :: Array (Event (Attribute Polyline_)) -> Array Nut -> Nut polyline = DC.elementify2 "polyline" diff --git a/src/Deku/DOM/Elt/Pre.purs b/src/Deku/DOM/Elt/Pre.purs index fdf9acbb..7dcddf2d 100644 --- a/src/Deku/DOM/Elt/Pre.purs +++ b/src/Deku/DOM/Elt/Pre.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Pre_ pre - :: Event (Attribute Pre_) + :: Array (Event (Attribute Pre_)) -> Array Nut -> Nut pre = DC.elementify2 "pre" diff --git a/src/Deku/DOM/Elt/Progress.purs b/src/Deku/DOM/Elt/Progress.purs index a1013b0c..0907f91d 100644 --- a/src/Deku/DOM/Elt/Progress.purs +++ b/src/Deku/DOM/Elt/Progress.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Progress_ progress - :: Event (Attribute Progress_) + :: Array (Event (Attribute Progress_)) -> Array Nut -> Nut progress = DC.elementify2 "progress" diff --git a/src/Deku/DOM/Elt/Q.purs b/src/Deku/DOM/Elt/Q.purs index fa0c1bd5..4733562a 100644 --- a/src/Deku/DOM/Elt/Q.purs +++ b/src/Deku/DOM/Elt/Q.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Q_ q - :: Event (Attribute Q_) + :: Array (Event (Attribute Q_)) -> Array Nut -> Nut q = DC.elementify2 "q" diff --git a/src/Deku/DOM/Elt/RadialGradient.purs b/src/Deku/DOM/Elt/RadialGradient.purs index 26c909a7..154d69c1 100644 --- a/src/Deku/DOM/Elt/RadialGradient.purs +++ b/src/Deku/DOM/Elt/RadialGradient.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data RadialGradient_ radialGradient - :: Event (Attribute RadialGradient_) + :: Array (Event (Attribute RadialGradient_)) -> Array Nut -> Nut radialGradient = DC.elementify2 "radialGradient" diff --git a/src/Deku/DOM/Elt/Rect.purs b/src/Deku/DOM/Elt/Rect.purs index a0e95008..cc2e94a7 100644 --- a/src/Deku/DOM/Elt/Rect.purs +++ b/src/Deku/DOM/Elt/Rect.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Rect_ rect - :: Event (Attribute Rect_) + :: Array (Event (Attribute Rect_)) -> Array Nut -> Nut rect = DC.elementify2 "rect" diff --git a/src/Deku/DOM/Elt/Rp.purs b/src/Deku/DOM/Elt/Rp.purs index a184aaca..4b7758e4 100644 --- a/src/Deku/DOM/Elt/Rp.purs +++ b/src/Deku/DOM/Elt/Rp.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Rp_ rp - :: Event (Attribute Rp_) + :: Array (Event (Attribute Rp_)) -> Array Nut -> Nut rp = DC.elementify2 "rp" diff --git a/src/Deku/DOM/Elt/Rt.purs b/src/Deku/DOM/Elt/Rt.purs index 453ccbb3..7bed1b21 100644 --- a/src/Deku/DOM/Elt/Rt.purs +++ b/src/Deku/DOM/Elt/Rt.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Rt_ rt - :: Event (Attribute Rt_) + :: Array (Event (Attribute Rt_)) -> Array Nut -> Nut rt = DC.elementify2 "rt" diff --git a/src/Deku/DOM/Elt/Ruby.purs b/src/Deku/DOM/Elt/Ruby.purs index 530f7257..14ac51e5 100644 --- a/src/Deku/DOM/Elt/Ruby.purs +++ b/src/Deku/DOM/Elt/Ruby.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Ruby_ ruby - :: Event (Attribute Ruby_) + :: Array (Event (Attribute Ruby_)) -> Array Nut -> Nut ruby = DC.elementify2 "ruby" diff --git a/src/Deku/DOM/Elt/S.purs b/src/Deku/DOM/Elt/S.purs index 2f35f1c6..78beb3fd 100644 --- a/src/Deku/DOM/Elt/S.purs +++ b/src/Deku/DOM/Elt/S.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data S_ s - :: Event (Attribute S_) + :: Array (Event (Attribute S_)) -> Array Nut -> Nut s = DC.elementify2 "s" diff --git a/src/Deku/DOM/Elt/Samp.purs b/src/Deku/DOM/Elt/Samp.purs index 540a281a..9d24daee 100644 --- a/src/Deku/DOM/Elt/Samp.purs +++ b/src/Deku/DOM/Elt/Samp.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Samp_ samp - :: Event (Attribute Samp_) + :: Array (Event (Attribute Samp_)) -> Array Nut -> Nut samp = DC.elementify2 "samp" diff --git a/src/Deku/DOM/Elt/Script.purs b/src/Deku/DOM/Elt/Script.purs index fdb018aa..02127636 100644 --- a/src/Deku/DOM/Elt/Script.purs +++ b/src/Deku/DOM/Elt/Script.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Script_ script - :: Event (Attribute Script_) + :: Array (Event (Attribute Script_)) -> Array Nut -> Nut script = DC.elementify2 "script" diff --git a/src/Deku/DOM/Elt/Section.purs b/src/Deku/DOM/Elt/Section.purs index 733b3e69..41e589fe 100644 --- a/src/Deku/DOM/Elt/Section.purs +++ b/src/Deku/DOM/Elt/Section.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Section_ section - :: Event (Attribute Section_) + :: Array (Event (Attribute Section_)) -> Array Nut -> Nut section = DC.elementify2 "section" diff --git a/src/Deku/DOM/Elt/Select.purs b/src/Deku/DOM/Elt/Select.purs index 4386aa41..2f33c265 100644 --- a/src/Deku/DOM/Elt/Select.purs +++ b/src/Deku/DOM/Elt/Select.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Select_ select - :: Event (Attribute Select_) + :: Array (Event (Attribute Select_)) -> Array Nut -> Nut select = DC.elementify2 "select" diff --git a/src/Deku/DOM/Elt/Set.purs b/src/Deku/DOM/Elt/Set.purs index 709eecf1..43c7e366 100644 --- a/src/Deku/DOM/Elt/Set.purs +++ b/src/Deku/DOM/Elt/Set.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Set_ set - :: Event (Attribute Set_) + :: Array (Event (Attribute Set_)) -> Array Nut -> Nut set = DC.elementify2 "set" diff --git a/src/Deku/DOM/Elt/Small.purs b/src/Deku/DOM/Elt/Small.purs index bdeb4eb5..afcaaa32 100644 --- a/src/Deku/DOM/Elt/Small.purs +++ b/src/Deku/DOM/Elt/Small.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Small_ small - :: Event (Attribute Small_) + :: Array (Event (Attribute Small_)) -> Array Nut -> Nut small = DC.elementify2 "small" diff --git a/src/Deku/DOM/Elt/Source.purs b/src/Deku/DOM/Elt/Source.purs index 2cfff4c7..3e294200 100644 --- a/src/Deku/DOM/Elt/Source.purs +++ b/src/Deku/DOM/Elt/Source.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Source_ source - :: Event (Attribute Source_) + :: Array (Event (Attribute Source_)) -> Array Nut -> Nut source = DC.elementify2 "source" diff --git a/src/Deku/DOM/Elt/Span.purs b/src/Deku/DOM/Elt/Span.purs index 8399e8ac..e7fed4e0 100644 --- a/src/Deku/DOM/Elt/Span.purs +++ b/src/Deku/DOM/Elt/Span.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Span_ span - :: Event (Attribute Span_) + :: Array (Event (Attribute Span_)) -> Array Nut -> Nut span = DC.elementify2 "span" diff --git a/src/Deku/DOM/Elt/Stop.purs b/src/Deku/DOM/Elt/Stop.purs index 9a4b8aae..8bf250f2 100644 --- a/src/Deku/DOM/Elt/Stop.purs +++ b/src/Deku/DOM/Elt/Stop.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Stop_ stop - :: Event (Attribute Stop_) + :: Array (Event (Attribute Stop_)) -> Array Nut -> Nut stop = DC.elementify2 "stop" diff --git a/src/Deku/DOM/Elt/Strike.purs b/src/Deku/DOM/Elt/Strike.purs index da6ec44f..24c0ba49 100644 --- a/src/Deku/DOM/Elt/Strike.purs +++ b/src/Deku/DOM/Elt/Strike.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Strike_ strike - :: Event (Attribute Strike_) + :: Array (Event (Attribute Strike_)) -> Array Nut -> Nut strike = DC.elementify2 "strike" diff --git a/src/Deku/DOM/Elt/Strong.purs b/src/Deku/DOM/Elt/Strong.purs index 3296bd1b..366fbd35 100644 --- a/src/Deku/DOM/Elt/Strong.purs +++ b/src/Deku/DOM/Elt/Strong.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Strong_ strong - :: Event (Attribute Strong_) + :: Array (Event (Attribute Strong_)) -> Array Nut -> Nut strong = DC.elementify2 "strong" diff --git a/src/Deku/DOM/Elt/Style.purs b/src/Deku/DOM/Elt/Style.purs index b9c7136f..dc73d888 100644 --- a/src/Deku/DOM/Elt/Style.purs +++ b/src/Deku/DOM/Elt/Style.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Style_ style - :: Event (Attribute Style_) + :: Array (Event (Attribute Style_)) -> Array Nut -> Nut style = DC.elementify2 "style" diff --git a/src/Deku/DOM/Elt/Sub.purs b/src/Deku/DOM/Elt/Sub.purs index 65467217..f173a627 100644 --- a/src/Deku/DOM/Elt/Sub.purs +++ b/src/Deku/DOM/Elt/Sub.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Sub_ sub - :: Event (Attribute Sub_) + :: Array (Event (Attribute Sub_)) -> Array Nut -> Nut sub = DC.elementify2 "sub" diff --git a/src/Deku/DOM/Elt/Summary.purs b/src/Deku/DOM/Elt/Summary.purs index 46d8f93c..b9eb63f7 100644 --- a/src/Deku/DOM/Elt/Summary.purs +++ b/src/Deku/DOM/Elt/Summary.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Summary_ summary - :: Event (Attribute Summary_) + :: Array (Event (Attribute Summary_)) -> Array Nut -> Nut summary = DC.elementify2 "summary" diff --git a/src/Deku/DOM/Elt/Sup.purs b/src/Deku/DOM/Elt/Sup.purs index 9fc59257..eafdf55c 100644 --- a/src/Deku/DOM/Elt/Sup.purs +++ b/src/Deku/DOM/Elt/Sup.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Sup_ sup - :: Event (Attribute Sup_) + :: Array (Event (Attribute Sup_)) -> Array Nut -> Nut sup = DC.elementify2 "sup" diff --git a/src/Deku/DOM/Elt/Svg.purs b/src/Deku/DOM/Elt/Svg.purs index 52223d96..ec9fd6ce 100644 --- a/src/Deku/DOM/Elt/Svg.purs +++ b/src/Deku/DOM/Elt/Svg.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Svg_ svg - :: Event (Attribute Svg_) + :: Array (Event (Attribute Svg_)) -> Array Nut -> Nut svg = DC.elementify2 "svg" diff --git a/src/Deku/DOM/Elt/Switch.purs b/src/Deku/DOM/Elt/Switch.purs index 54bb2da8..217dc5e1 100644 --- a/src/Deku/DOM/Elt/Switch.purs +++ b/src/Deku/DOM/Elt/Switch.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Switch_ switch - :: Event (Attribute Switch_) + :: Array (Event (Attribute Switch_)) -> Array Nut -> Nut switch = DC.elementify2 "switch" diff --git a/src/Deku/DOM/Elt/Symbol.purs b/src/Deku/DOM/Elt/Symbol.purs index 6fd12102..9e9af8c5 100644 --- a/src/Deku/DOM/Elt/Symbol.purs +++ b/src/Deku/DOM/Elt/Symbol.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Symbol_ symbol - :: Event (Attribute Symbol_) + :: Array (Event (Attribute Symbol_)) -> Array Nut -> Nut symbol = DC.elementify2 "symbol" diff --git a/src/Deku/DOM/Elt/Table.purs b/src/Deku/DOM/Elt/Table.purs index b6d36ccb..33a9f7a9 100644 --- a/src/Deku/DOM/Elt/Table.purs +++ b/src/Deku/DOM/Elt/Table.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Table_ table - :: Event (Attribute Table_) + :: Array (Event (Attribute Table_)) -> Array Nut -> Nut table = DC.elementify2 "table" diff --git a/src/Deku/DOM/Elt/Tbody.purs b/src/Deku/DOM/Elt/Tbody.purs index 143b0aa2..47216cb0 100644 --- a/src/Deku/DOM/Elt/Tbody.purs +++ b/src/Deku/DOM/Elt/Tbody.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Tbody_ tbody - :: Event (Attribute Tbody_) + :: Array (Event (Attribute Tbody_)) -> Array Nut -> Nut tbody = DC.elementify2 "tbody" diff --git a/src/Deku/DOM/Elt/Td.purs b/src/Deku/DOM/Elt/Td.purs index a84ee07a..974ed8e4 100644 --- a/src/Deku/DOM/Elt/Td.purs +++ b/src/Deku/DOM/Elt/Td.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Td_ td - :: Event (Attribute Td_) + :: Array (Event (Attribute Td_)) -> Array Nut -> Nut td = DC.elementify2 "td" diff --git a/src/Deku/DOM/Elt/Template.purs b/src/Deku/DOM/Elt/Template.purs index 722f8440..3de5e928 100644 --- a/src/Deku/DOM/Elt/Template.purs +++ b/src/Deku/DOM/Elt/Template.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Template_ template - :: Event (Attribute Template_) + :: Array (Event (Attribute Template_)) -> Array Nut -> Nut template = DC.elementify2 "template" diff --git a/src/Deku/DOM/Elt/Text.purs b/src/Deku/DOM/Elt/Text.purs index d2e26fe2..b37abfd7 100644 --- a/src/Deku/DOM/Elt/Text.purs +++ b/src/Deku/DOM/Elt/Text.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Text_ text - :: Event (Attribute Text_) + :: Array (Event (Attribute Text_)) -> Array Nut -> Nut text = DC.elementify2 "text" diff --git a/src/Deku/DOM/Elt/TextPath.purs b/src/Deku/DOM/Elt/TextPath.purs index 033b2371..bd64ed24 100644 --- a/src/Deku/DOM/Elt/TextPath.purs +++ b/src/Deku/DOM/Elt/TextPath.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data TextPath_ textPath - :: Event (Attribute TextPath_) + :: Array (Event (Attribute TextPath_)) -> Array Nut -> Nut textPath = DC.elementify2 "textPath" diff --git a/src/Deku/DOM/Elt/Textarea.purs b/src/Deku/DOM/Elt/Textarea.purs index 0ba689e4..c94cdd44 100644 --- a/src/Deku/DOM/Elt/Textarea.purs +++ b/src/Deku/DOM/Elt/Textarea.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Textarea_ textarea - :: Event (Attribute Textarea_) + :: Array (Event (Attribute Textarea_)) -> Array Nut -> Nut textarea = DC.elementify2 "textarea" diff --git a/src/Deku/DOM/Elt/Tfoot.purs b/src/Deku/DOM/Elt/Tfoot.purs index 46c288e4..b2e5b866 100644 --- a/src/Deku/DOM/Elt/Tfoot.purs +++ b/src/Deku/DOM/Elt/Tfoot.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Tfoot_ tfoot - :: Event (Attribute Tfoot_) + :: Array (Event (Attribute Tfoot_)) -> Array Nut -> Nut tfoot = DC.elementify2 "tfoot" diff --git a/src/Deku/DOM/Elt/Th.purs b/src/Deku/DOM/Elt/Th.purs index ae66e6df..c767eecf 100644 --- a/src/Deku/DOM/Elt/Th.purs +++ b/src/Deku/DOM/Elt/Th.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Th_ th - :: Event (Attribute Th_) + :: Array (Event (Attribute Th_)) -> Array Nut -> Nut th = DC.elementify2 "th" diff --git a/src/Deku/DOM/Elt/Thead.purs b/src/Deku/DOM/Elt/Thead.purs index d1b31549..a5f183a6 100644 --- a/src/Deku/DOM/Elt/Thead.purs +++ b/src/Deku/DOM/Elt/Thead.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Thead_ thead - :: Event (Attribute Thead_) + :: Array (Event (Attribute Thead_)) -> Array Nut -> Nut thead = DC.elementify2 "thead" diff --git a/src/Deku/DOM/Elt/Time.purs b/src/Deku/DOM/Elt/Time.purs index 7d91b272..286af821 100644 --- a/src/Deku/DOM/Elt/Time.purs +++ b/src/Deku/DOM/Elt/Time.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Time_ time - :: Event (Attribute Time_) + :: Array (Event (Attribute Time_)) -> Array Nut -> Nut time = DC.elementify2 "time" diff --git a/src/Deku/DOM/Elt/Title.purs b/src/Deku/DOM/Elt/Title.purs index 06d9d38f..a4bd8d4c 100644 --- a/src/Deku/DOM/Elt/Title.purs +++ b/src/Deku/DOM/Elt/Title.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Title_ title - :: Event (Attribute Title_) + :: Array (Event (Attribute Title_)) -> Array Nut -> Nut title = DC.elementify2 "title" diff --git a/src/Deku/DOM/Elt/Tr.purs b/src/Deku/DOM/Elt/Tr.purs index 9a8b8c6f..9135ca37 100644 --- a/src/Deku/DOM/Elt/Tr.purs +++ b/src/Deku/DOM/Elt/Tr.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Tr_ tr - :: Event (Attribute Tr_) + :: Array (Event (Attribute Tr_)) -> Array Nut -> Nut tr = DC.elementify2 "tr" diff --git a/src/Deku/DOM/Elt/Track.purs b/src/Deku/DOM/Elt/Track.purs index 761d11e9..7baa0712 100644 --- a/src/Deku/DOM/Elt/Track.purs +++ b/src/Deku/DOM/Elt/Track.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Track_ track - :: Event (Attribute Track_) + :: Array (Event (Attribute Track_)) -> Array Nut -> Nut track = DC.elementify2 "track" diff --git a/src/Deku/DOM/Elt/Tspan.purs b/src/Deku/DOM/Elt/Tspan.purs index fa1b52a0..ebe04d77 100644 --- a/src/Deku/DOM/Elt/Tspan.purs +++ b/src/Deku/DOM/Elt/Tspan.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Tspan_ tspan - :: Event (Attribute Tspan_) + :: Array (Event (Attribute Tspan_)) -> Array Nut -> Nut tspan = DC.elementify2 "tspan" diff --git a/src/Deku/DOM/Elt/Tt.purs b/src/Deku/DOM/Elt/Tt.purs index a16e0e3e..074959b3 100644 --- a/src/Deku/DOM/Elt/Tt.purs +++ b/src/Deku/DOM/Elt/Tt.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Tt_ tt - :: Event (Attribute Tt_) + :: Array (Event (Attribute Tt_)) -> Array Nut -> Nut tt = DC.elementify2 "tt" diff --git a/src/Deku/DOM/Elt/U.purs b/src/Deku/DOM/Elt/U.purs index a019e673..a55383da 100644 --- a/src/Deku/DOM/Elt/U.purs +++ b/src/Deku/DOM/Elt/U.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data U_ u - :: Event (Attribute U_) + :: Array (Event (Attribute U_)) -> Array Nut -> Nut u = DC.elementify2 "u" diff --git a/src/Deku/DOM/Elt/Ul.purs b/src/Deku/DOM/Elt/Ul.purs index 334b72dd..3dc19daa 100644 --- a/src/Deku/DOM/Elt/Ul.purs +++ b/src/Deku/DOM/Elt/Ul.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Ul_ ul - :: Event (Attribute Ul_) + :: Array (Event (Attribute Ul_)) -> Array Nut -> Nut ul = DC.elementify2 "ul" diff --git a/src/Deku/DOM/Elt/Use.purs b/src/Deku/DOM/Elt/Use.purs index 2a27f1d9..08fcf8b6 100644 --- a/src/Deku/DOM/Elt/Use.purs +++ b/src/Deku/DOM/Elt/Use.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Use_ use - :: Event (Attribute Use_) + :: Array (Event (Attribute Use_)) -> Array Nut -> Nut use = DC.elementify2 "use" diff --git a/src/Deku/DOM/Elt/Var.purs b/src/Deku/DOM/Elt/Var.purs index 9b432fcc..505cfd2c 100644 --- a/src/Deku/DOM/Elt/Var.purs +++ b/src/Deku/DOM/Elt/Var.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Var_ var - :: Event (Attribute Var_) + :: Array (Event (Attribute Var_)) -> Array Nut -> Nut var = DC.elementify2 "var" diff --git a/src/Deku/DOM/Elt/Video.purs b/src/Deku/DOM/Elt/Video.purs index 8e7a097a..412bd782 100644 --- a/src/Deku/DOM/Elt/Video.purs +++ b/src/Deku/DOM/Elt/Video.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Video_ video - :: Event (Attribute Video_) + :: Array (Event (Attribute Video_)) -> Array Nut -> Nut video = DC.elementify2 "video" diff --git a/src/Deku/DOM/Elt/View.purs b/src/Deku/DOM/Elt/View.purs index 6af11235..c1443ff4 100644 --- a/src/Deku/DOM/Elt/View.purs +++ b/src/Deku/DOM/Elt/View.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data View_ view - :: Event (Attribute View_) + :: Array (Event (Attribute View_)) -> Array Nut -> Nut view = DC.elementify2 "view" diff --git a/src/Deku/DOM/Elt/Wbr.purs b/src/Deku/DOM/Elt/Wbr.purs index 67d034d7..72b2f492 100644 --- a/src/Deku/DOM/Elt/Wbr.purs +++ b/src/Deku/DOM/Elt/Wbr.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Wbr_ wbr - :: Event (Attribute Wbr_) + :: Array (Event (Attribute Wbr_)) -> Array Nut -> Nut wbr = DC.elementify2 "wbr" diff --git a/src/Deku/DOM/Elt/Xdata.purs b/src/Deku/DOM/Elt/Xdata.purs index c1121b17..ecbc6162 100644 --- a/src/Deku/DOM/Elt/Xdata.purs +++ b/src/Deku/DOM/Elt/Xdata.purs @@ -9,7 +9,7 @@ import FRP.Event (Event) data Xdata_ xdata - :: Event (Attribute Xdata_) + :: Array (Event (Attribute Xdata_)) -> Array Nut -> Nut xdata = DC.elementify2 "data" diff --git a/test/Performance/Test/State/Deku.purs b/test/Performance/Test/State/Deku.purs index 11cc30ed..25786cd4 100644 --- a/test/Performance/Test/State/Deku.purs +++ b/test/Performance/Test/State/Deku.purs @@ -4,7 +4,7 @@ import Prelude import Control.Alt ((<|>)) import Data.Array.NonEmpty (replicate) -import Data.Foldable (oneOf, sequence_, traverse_) +import Data.Foldable (sequence_, traverse_) import Data.Maybe (Maybe(..)) import Deku.Attribute ((:=)) import Deku.Control (text, text_) @@ -67,29 +67,27 @@ scene notifyEnd = in ( D.div_ [ D.button - ( oneOf - [ pure $ D.Id := (testToString StateDeku <> startSuffix) - , stateE <#> \state -> D.OnClick := do - ref <- Ref.new state - let modify = flip Ref.modify ref - sequence_ $ replicate stateUpdates' $ modify - (\s -> s { n = s.n + 1 }) - sequence_ $ replicate stateUpdates' $ modify \s -> - s - { n1 = s.n1 + 1 } - sequence_ $ replicate stateUpdates' $ modify \s -> - s - { n2 = s.n2 + 1 } - sequence_ $ replicate stateUpdates' $ modify \s -> - s - { n3 = s.n3 + 1 } - sequence_ $ replicate stateUpdates' $ modify \s -> - s - { n4 = s.n4 + 1 } - Ref.read ref >>= setState - notifyEnd - ] - ) + [ pure $ D.Id := (testToString StateDeku <> startSuffix) + , stateE <#> \state -> D.OnClick := do + ref <- Ref.new state + let modify = flip Ref.modify ref + sequence_ $ replicate stateUpdates' $ modify + (\s -> s { n = s.n + 1 }) + sequence_ $ replicate stateUpdates' $ modify \s -> + s + { n1 = s.n1 + 1 } + sequence_ $ replicate stateUpdates' $ modify \s -> + s + { n2 = s.n2 + 1 } + sequence_ $ replicate stateUpdates' $ modify \s -> + s + { n3 = s.n3 + 1 } + sequence_ $ replicate stateUpdates' $ modify \s -> + s + { n4 = s.n4 + 1 } + Ref.read ref >>= setState + notifyEnd + ] [ text_ "Start Test" ] , text (show <$> stateE) ] diff --git a/test/Performance/Test/Todo/Deku.purs b/test/Performance/Test/Todo/Deku.purs index afccca2d..70379ae1 100644 --- a/test/Performance/Test/Todo/Deku.purs +++ b/test/Performance/Test/Todo/Deku.purs @@ -5,7 +5,7 @@ import Prelude import Control.Alt ((<|>)) import Data.Array (cons, drop, head, length, reverse, takeEnd) import Data.Filterable (filter) -import Data.Foldable (for_, oneOf, oneOfMap, traverse_) +import Data.Foldable (for_, oneOfMap, traverse_) import Data.Maybe (Maybe(..)) import Data.Set as Set import Data.Tuple (snd) @@ -106,51 +106,47 @@ containerD initialState = Deku.do ) D.div_ [ D.button - ( oneOf - [ pure $ D.Id := Shared.addNewId - , click $ state <#> \st -> do - newState <- liftEffect $ Shared.createTodo st - setUndo (PushUndo (UndoAdd newState.lastIndex)) - setState - ( const newState - ) - ] - ) + [ pure $ D.Id := Shared.addNewId + , click $ state <#> \st -> do + newState <- liftEffect $ Shared.createTodo st + setUndo (PushUndo (UndoAdd newState.lastIndex)) + setState + ( const newState + ) + ] [ text_ "Add New" ] , D.button - ( oneOf - [ pure $ D.Id := Shared.undoId - , click $ undos <#> \uu -> - for_ (head uu) \u -> do - case u of - UndoRename id s -> do - updateNameAt id s - setRename { address: id, payload: s } - pure unit - UndoAdd id -> do - setState - ( \x -> x - { todos = filter - ( \y -> y.id /= id - ) - x.todos - } - ) - setDelete { address: id, payload: unit } - UndoCompleted id cs -> do - setState - ( \x -> x - { completed = - (if cs then Set.insert else Set.delete) id - x.completed - } - ) - setCompleteStatus { address: id, payload: cs } - setUndo PopUndo - ] - ) + [ pure $ D.Id := Shared.undoId + , click $ undos <#> \uu -> + for_ (head uu) \u -> do + case u of + UndoRename id s -> do + updateNameAt id s + setRename { address: id, payload: s } + pure unit + UndoAdd id -> do + setState + ( \x -> x + { todos = filter + ( \y -> y.id /= id + ) + x.todos + } + ) + setDelete { address: id, payload: unit } + UndoCompleted id cs -> do + setState + ( \x -> x + { completed = + (if cs then Set.insert else Set.delete) id + x.completed + } + ) + setCompleteStatus { address: id, payload: cs } + setUndo PopUndo + ] [ text_ "Undo" ] - , D.div (oneOf [ pure $ D.Id := Shared.todosId ]) + , D.div [ pure $ D.Id := Shared.todosId ] [ dyn ( toDyn # map \td -> do @@ -193,16 +189,15 @@ todoD { id, description } completeStatus newName doEditName doChecked = Deku.do let name = name' <|> pure description D.div_ [ D.input - ( oneOf - [ pure $ D.Id := Shared.editId id - , (pure description <|> newName) <#> (D.Value := _) - , name <#> setName >>> (D.OnInput := _) - ] - ) + [ pure $ D.Id := Shared.editId id + , (pure description <|> newName) <#> (D.Value := _) + , name <#> setName >>> (D.OnInput := _) + ] + [] , checkboxD { id } completeStatus doChecked , D.button - (oneOf [ pure $ D.Id := Shared.saveId id, click (name <#> doEditName) ]) + [ pure $ D.Id := Shared.saveId id, click (name <#> doEditName) ] [ text_ "Save Changes" ] ] @@ -215,12 +210,12 @@ checkboxD { id } completeStatus doChecked = Deku.do localSetChecked /\ localChecked <- bussedUncurried let checked = pure true <|> completeStatus D.input - ( oneOf - [ pure $ D.Id := (Shared.checkId id) + + [ pure $ D.Id := (Shared.checkId id) , pure $ D.Xtype := "checkbox" , completeStatus <#> show >>> (D.Checked := _) , (checked <|> localChecked) <#> (\x -> doChecked x *> localSetChecked (not x)) >>> (D.OnInput := _) - ] - ) + ] + [] diff --git a/test/Test/Main.purs b/test/Test/Main.purs index 1a341798..05b1de4b 100644 --- a/test/Test/Main.purs +++ b/test/Test/Main.purs @@ -23,7 +23,7 @@ import Deku.Listeners (click, click_) import Deku.Pursx ((~~)) import Deku.Toplevel (hydrate', runInBody', runSSR) import Effect (Effect) -import FRP.Event (Event, fold, mapAccum, merge) +import FRP.Event (Event, fold, mapAccum) import Type.Proxy (Proxy(..)) foreign import hackyInnerHTML :: String -> String -> Effect Unit @@ -38,7 +38,7 @@ ssr :: Nut -> ST Global String ssr i = pure "" <> runSSR i sanityCheck :: Nut -sanityCheck = D.span (id_ "hello") [ text_ "Hello" ] +sanityCheck = D.span [ id_ "hello" ] [ text_ "Hello" ] elementsInCorrectOrder :: Nut elementsInCorrectOrder = do @@ -48,18 +48,18 @@ elementsInCorrectOrder = do | otherwise = [ do let x = "span" <> show n <> "-0" - D.span (id_ x) [ text_ (x <> "A") ] + D.span [ id_ x ] [ text_ (x <> "A") ] , do let x = "span" <> show n <> "-1" - D.span (id_ x) [ text_ (x <> "B") ] + D.span [ id_ x ] [ text_ (x <> "B") ] , do let x = "div" <> show n <> "-2" - D.span (id_ x) (l (n + 1)) + D.span [ id_ x ] (l (n + 1)) , do let x = "span" <> show n <> "-3" - D.span (id_ x) [ text_ (x <> "D") ] + D.span [ id_ x ] [ text_ (x <> "D") ] ] - D.div (id_ "div0-0") (l 1) + D.div [ id_ "div0-0" ] (l 1) dynAppearsCorrectly :: Nut dynAppearsCorrectly = Deku.do @@ -67,14 +67,14 @@ dynAppearsCorrectly = Deku.do counter :: forall a. Event a -> Event Int counter event = fold (\a _ -> a + 1) (-1) event setItem /\ item <- useState' - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , dyn ( counter item <#> \i -> pure - $ insert_ (D.span (id_ ("dyn" <> show i)) [ text_ (show i) ]) + $ insert_ (D.span [ id_ ("dyn" <> show i) ] [ text_ (show i) ]) ) - , D.button (oneOf [ id_ "incr", click_ (setItem unit) ]) [ text_ "incr" ] + , D.button [ id_ "incr", click_ (setItem unit) ] [ text_ "incr" ] ] deeplyNestedPreservesOrder :: Nut @@ -91,15 +91,15 @@ deeplyNestedPreservesOrder = Deku.do ( counter item <#> \i -> pure $ insert_ if i == 1 then mydyn (n + 1) - else D.span (id_ ("dyn" <> sn <> "-" <> show i)) + else D.span [ id_ ("dyn" <> sn <> "-" <> show i) ] [ text_ (sn <> "-" <> show i) ] ) - , D.button (oneOf [ id_ $ "incr-" <> sn, click_ (setItem unit) ]) + , D.button [ id_ $ "incr-" <> sn, click_ (setItem unit) ] [ text_ $ "incr-" <> sn ] ] - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , mydyn 0 ] @@ -110,48 +110,48 @@ isAMonoid = intercalate mempty $ map text_ [ "m", "o", "n", "o", "i", "d" ] sendsToPosition :: Nut sendsToPosition = Deku.do setPosIdx /\ posIdx <- useState' - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , dyn ( oneOfMap pure [ 0, 1, 2, 3, 4 ] <#> \i -> oneOf [ pure $ insert_ - (D.span (id_ ("dyn" <> show i)) [ text_ (show i) ]) + (D.span [ id_ ("dyn" <> show i) ] [ text_ (show i) ]) , if i == 3 then posIdx <#> sendToPos else empty ] ) - , D.button (oneOf [ id_ "pos", click_ (setPosIdx 1) ]) + , D.button [ id_ "pos", click_ (setPosIdx 1) ] [ text_ "send to pos" ] ] sendsToPositionFixed :: Nut sendsToPositionFixed = Deku.do setPosIdx /\ posIdx <- useState' - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , dyn ( oneOfMap pure [ 0, 1, 2, 3, 4 ] <#> \i -> oneOf [ pure $ insert_ $ fixed - [ D.span (id_ ("dyn" <> show i <> "a")) + [ D.span [ id_ ("dyn" <> show i <> "a") ] [ text_ (show i <> "a") ] - , D.span (id_ ("dyn" <> show i <> "a")) + , D.span [ id_ ("dyn" <> show i <> "a") ] [ text_ (show i <> "b") ] ] , if i == 3 then posIdx <#> sendToPos else empty ] ) - , D.button (oneOf [ id_ "pos", click_ (setPosIdx 1) ]) + , D.button [ id_ "pos", click_ (setPosIdx 1) ] [ text_ "send to pos" ] ] insertsAtCorrectPositions :: Nut -insertsAtCorrectPositions = D.div (id_ "div0") +insertsAtCorrectPositions = D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , dyn -- if we just used insert_ here, it would go in -- linear order @@ -161,7 +161,7 @@ insertsAtCorrectPositions = D.div (id_ "div0") ( oneOfMap pure [ 3, 0, 4, 2, 1 ] <#> \i -> oneOf [ pure $ insert i - (D.span (id_ ("dyn" <> show i)) [ text_ (show i) ]) + (D.span [ id_ ("dyn" <> show i) ] [ text_ (show i) ]) ] ) @@ -173,26 +173,26 @@ switcherWorksForCompositionalElements = Deku.do counter :: forall a. Event a -> Event Int counter event = fold (\a _ -> 1 + a) (-1) event setItem /\ item <- useState unit - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" - , D.span (id_ "div1") [ text_ "bar" ] + , D.span [ id_ "div1" ] [ text_ "bar" ] , counter item # switcher \i -> fixed - ( [ 0, 1, 2 ] <#> \j -> D.span (id_ $ "id" <> show j) + ( [ 0, 1, 2 ] <#> \j -> D.span [ id_ $ "id" <> show j ] [ text_ (show i <> "-" <> show j) ] ) - , D.button (oneOf [ id_ "incr", click_ (setItem unit) ]) [ text_ "incr" ] + , D.button [ id_ "incr", click_ (setItem unit) ] [ text_ "incr" ] ] tabbedNavigationWithPursx :: Nut tabbedNavigationWithPursx = Deku.do setItem /\ item <- useState 0 - D.div (id_ "div0") + D.div [ id_ "div0" ] [ D.div_ - [ D.button (oneOf [ id_ "home-btn", click_ (setItem 0) ]) + [ D.button [ id_ "home-btn", click_ (setItem 0) ] [ text_ "home" ] - , D.button (oneOf [ id_ "about-btn", click_ (setItem 1) ]) + , D.button [ id_ "about-btn", click_ (setItem 1) ] [ text_ "about" ] - , D.button (oneOf [ id_ "contact-btn", click_ (setItem 2) ]) + , D.button [ id_ "contact-btn", click_ (setItem 2) ] [ text_ "contact" ] ] , item # switcher case _ of @@ -222,14 +222,14 @@ portalsCompose = Deku.do | i == n -> e | otherwise -> blank ) - D.div (id_ "maindiv") + D.div [ id_ "maindiv" ] [ D.div_ [ text_ "d0" ] , switchMe 0 , D.div_ [ text_ "d1" ] , switchMe 1 , D.div_ [ text_ "d2" ] , switchMe 2 - , D.button (oneOf [ id_ "incr", click_ (setItem unit) ]) + , D.button [ id_ "incr", click_ (setItem unit) ] [ text_ "incr" ] ] @@ -244,7 +244,7 @@ globalPortalsRetainPortalnessWhenSentOutOfScope = Deku.do setPortalInContext /\ portalInContext <- useState true setPortedNut /\ portedNut <- useState' D.div_ - [ D.div (id_ "outer-scope") + [ D.div [ id_ "outer-scope" ] [ limitTo 2 (Tuple <$> portalInContext <*> portedNut) <#~> \(Tuple tf p) -> if not tf then p else D.div_ [ text_ "no dice!" ] @@ -252,18 +252,17 @@ globalPortalsRetainPortalnessWhenSentOutOfScope = Deku.do , ( globalPortal1 (D.div_ [ text_ "foo" ]) \e -> Deku.do useEffect (pure unit) (const (setPortedNut e)) - D.div (id_ "inner-scope") + D.div [ id_ "inner-scope" ] [ (Tuple <$> portalInContext <*> portedNut) <#~> \(Tuple tf p) -> if tf then p else D.div_ [ text_ "no dice!" ] ] ) , D.button - ( merge - [ id_ "portal-btn" - , click $ portalInContext <#> not >>> setPortalInContext - ] - ) + [ id_ "portal-btn" + , click $ portalInContext <#> not >>> setPortalInContext + ] + [ text_ "switch" ] ] @@ -278,7 +277,7 @@ localPortalsLosePortalnessWhenSentOutOfScope = Deku.do setPortalInContext /\ portalInContext <- useState true setPortedNut /\ portedNut <- useState' D.div_ - [ D.div (id_ "outer-scope") + [ D.div [ id_ "outer-scope" ] [ limitTo 2 (Tuple <$> portalInContext <*> portedNut) <#~> \(Tuple tf p) -> if not tf then p else D.div_ [ text_ "no dice!" ] @@ -286,23 +285,21 @@ localPortalsLosePortalnessWhenSentOutOfScope = Deku.do , portal1 (D.div_ [ text_ "foo" ]) \e -> Deku.do useEffect (pure unit) (const (setPortedNut e)) - D.div (id_ "inner-scope") + D.div [ id_ "inner-scope" ] [ (Tuple <$> portalInContext <*> portedNut) <#~> \(Tuple tf p) -> if tf then p else D.div_ [ text_ "no dice!" ] ] , D.button - ( merge - [ id_ "portal-btn" - , click $ portalInContext <#> not >>> setPortalInContext - ] - ) + [ id_ "portal-btn" + , click $ portalInContext <#> not >>> setPortalInContext + ] [ text_ "switch" ] ] pursXComposes :: Nut pursXComposes = Deku.do - D.div (id_ "div0") + D.div [ id_ "div0" ] [ (Proxy :: _ "

début ~me~ fin

") ~~ { me: fixed [ text_ "milieu", text_ " ", text_ "après-milieu" ] } ] @@ -310,16 +307,16 @@ pursXComposes = Deku.do lifecycle :: Nut lifecycle = Deku.do setItem /\ item <- useState 0 - D.div (id_ "div0") + D.div [ id_ "div0" ] [ D.div_ - [ D.button (oneOf [ id_ "home-btn", click_ (setItem 0) ]) + [ D.button [ id_ "home-btn", click_ (setItem 0) ] [ text_ "home" ] - , D.button (oneOf [ id_ "about-btn", click_ (setItem 1) ]) + , D.button [ id_ "about-btn", click_ (setItem 1) ] [ text_ "about" ] - , D.button (oneOf [ id_ "contact-btn", click_ (setItem 2) ]) + , D.button [ id_ "contact-btn", click_ (setItem 2) ] [ text_ "contact" ] ] - , D.span (D.Id !:= "hack") [] + , D.span [ D.Id !:= "hack" ] [] , item # switcher case _ of 0 -> D.span_ [ text_ "a" ] 1 -> onWillMount (hackyInnerHTML "hack" "hello") $ D.span_ [ text_ "b" ] @@ -331,25 +328,23 @@ lifecycleWillAndDidMount :: Nut lifecycleWillAndDidMount = D.div_ [ Deku.do setInt /\ int <- useState' - onWillMount (setInt 42) (D.span (id_ "span1") [ text (show <$> int) ]) + onWillMount (setInt 42) (D.span [ id_ "span1" ] [ text (show <$> int) ]) , Deku.do setInt /\ int <- useState' - onDidMount (setInt 42) (D.span (id_ "span2") [ text (show <$> int) ]) + onDidMount (setInt 42) (D.span [ id_ "span2" ] [ text (show <$> int) ]) ] unsetUnsets :: Nut unsetUnsets = Deku.do unsetAttr /\ unset <- useState true - D.div (id_ "div0") + D.div [ id_ "div0" ] [ text_ "foo" , D.span - ( oneOf - [ id_ "span1" - , unset <#> if _ then D.Style := "color:red;" else D.Style := unit - ] - ) + [ id_ "span1" + , unset <#> if _ then D.Style := "color:red;" else D.Style := unit + ] [ text_ "bar" ] - , D.button (oneOf [ id_ "unsetter", click_ (unsetAttr false) ]) + , D.button [ id_ "unsetter", click_ (unsetAttr false) ] [ text_ "unset" ] ] @@ -363,21 +358,19 @@ useRefWorks = Deku.do cref <- useRef startsAt counter D.div_ [ D.button - ( merge - [ click $ counter <#> add 1 >>> setCounter - , id_ "counter" - ] - ) + [ click $ counter <#> add 1 >>> setCounter + , id_ "counter" + ] + [ text_ "Increment" ] , D.div_ ( 0 .. 9 <#> \i -> Deku.do setButtonTxt /\ buttonTxt <- useState' D.button - ( merge - [ click_ $ cref >>= setButtonTxt - , id_ $ "b" <> show i - ] - ) + [ click_ $ cref >>= setButtonTxt + , id_ $ "b" <> show i + ] + [ text (show <$> buttonTxt) ] ) ] @@ -390,13 +383,11 @@ useEffectWorks = Deku.do setCounter (i + 1) D.div_ [ D.button - ( merge - [ click $ counter <#> add 1 >>> setCounter - , id_ "counter" - ] - ) + [ click $ counter <#> add 1 >>> setCounter + , id_ "counter" + ] [ text_ "Increment" ] - , D.div (id_ "mydiv") [ text (show <$> counter) ] + , D.div [ id_ "mydiv" ] [ text (show <$> counter) ] ] customHooksDoTheirThing :: Nut @@ -405,14 +396,12 @@ customHooksDoTheirThing = Deku.do e1 /\ e2 <- myHook counter D.div_ [ D.button - ( merge - [ click $ counter <#> add 1 >>> setCounter - , id_ "counter" - ] - ) + [ click $ counter <#> add 1 >>> setCounter + , id_ "counter" + ] [ text_ "Increment" ] - , D.div (id_ "mydiv1") [ text (show <$> e1) ] - , D.div (id_ "mydiv2") [ text (show <$> e2) ] + , D.div [ id_ "mydiv1" ] [ text (show <$> e1) ] + , D.div [ id_ "mydiv2" ] [ text (show <$> e2) ] ] where myHook :: Event Int -> Hook (Tuple (Event Int) (Event Int))