git.iko.soy/purestack-dev/purescript-plum
on master help sign in
.
eb22576iko
plum/index.js+66−56
@@ -774,7 +774,7 @@
774 var foldl2 = foldl(dictFoldable);
774 var foldl2 = foldl(dictFoldable);
775 return function(dictMonoid) {
775 return function(dictMonoid) {
776 var append3 = append(dictMonoid.Semigroup0());
776 var append3 = append(dictMonoid.Semigroup0());
777− var mempty5 = mempty(dictMonoid);
777+ var mempty6 = mempty(dictMonoid);
778 return function(sep) {
778 return function(sep) {
779 return function(xs) {
779 return function(xs) {
780 var go2 = function(v) {
780 var go2 = function(v) {
@@ -794,7 +794,7 @@
794 };
794 };
795 return foldl2(go2)({
795 return foldl2(go2)({
796 init: true,
796 init: true,
797− acc: mempty5
797+ acc: mempty6
798 })(xs).acc;
798 })(xs).acc;
799 };
799 };
800 };
800 };
@@ -804,13 +804,13 @@
804 var foldr22 = foldr(dictFoldable);
804 var foldr22 = foldr(dictFoldable);
805 return function(dictMonoid) {
805 return function(dictMonoid) {
806 var append3 = append(dictMonoid.Semigroup0());
806 var append3 = append(dictMonoid.Semigroup0());
807− var mempty5 = mempty(dictMonoid);
807+ var mempty6 = mempty(dictMonoid);
808 return function(f) {
808 return function(f) {
809 return foldr22(function(x) {
809 return foldr22(function(x) {
810 return function(acc) {
810 return function(acc) {
811 return append3(f(x))(acc);
811 return append3(f(x))(acc);
812 };
812 };
813− })(mempty5);
813+ })(mempty6);
814 };
814 };
815 };
815 };
816 };
816 };
@@ -1803,14 +1803,14 @@
1803 };
1803 };
1804 };
1804 };
1805 var applicativeWriterT = function(dictMonoid) {
1805 var applicativeWriterT = function(dictMonoid) {
1806− var mempty5 = mempty(dictMonoid);
1806+ var mempty6 = mempty(dictMonoid);
1807 var applyWriterT1 = applyWriterT(dictMonoid.Semigroup0());
1807 var applyWriterT1 = applyWriterT(dictMonoid.Semigroup0());
1808 return function(dictApplicative) {
1808 return function(dictApplicative) {
1809 var pure4 = pure(dictApplicative);
1809 var pure4 = pure(dictApplicative);
1810 var applyWriterT2 = applyWriterT1(dictApplicative.Apply0());
1810 var applyWriterT2 = applyWriterT1(dictApplicative.Apply0());
1811 return {
1811 return {
1812 pure: function(a) {
1812 pure: function(a) {
1813− return pure4(new Tuple(a, mempty5));
1813+ return pure4(new Tuple(a, mempty6));
1814 },
1814 },
1815 Apply0: function() {
1815 Apply0: function() {
1816 return applyWriterT2;
1816 return applyWriterT2;
@@ -2086,7 +2086,7 @@
2086 var fold2 = /* @__PURE__ */ _foldM(applyFlipped);
2086 var fold2 = /* @__PURE__ */ _foldM(applyFlipped);
2087 var foldMap2 = function(dictMonoid) {
2087 var foldMap2 = function(dictMonoid) {
2088 var append1 = append(dictMonoid.Semigroup0());
2088 var append1 = append(dictMonoid.Semigroup0());
2089− var mempty5 = mempty(dictMonoid);
2089+ var mempty6 = mempty(dictMonoid);
2090 return function(f) {
2090 return function(f) {
2091 return fold2(function(acc) {
2091 return fold2(function(acc) {
2092 return function(k) {
2092 return function(k) {
@@ -2094,7 +2094,7 @@
2094 return append1(acc)(f(k)(v));
2094 return append1(acc)(f(k)(v));
2095 };
2095 };
2096 };
2096 };
2097− })(mempty5);
2097+ })(mempty6);
2098 };
2098 };
2099 };
2099 };
2100 var foldableObject = {
2100 var foldableObject = {
@@ -2239,6 +2239,7 @@
2239 var mempty1 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidRecord2(/* @__PURE__ */ monoidRecordCons2(monoidArray)()(monoidRecordCons1)));
2239 var mempty1 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidRecord2(/* @__PURE__ */ monoidRecordCons2(monoidArray)()(monoidRecordCons1)));
2240 var foldMap3 = /* @__PURE__ */ foldMap2(monoidString);
2240 var foldMap3 = /* @__PURE__ */ foldMap2(monoidString);
2241 var show1 = /* @__PURE__ */ show(showNumber);
2241 var show1 = /* @__PURE__ */ show(showNumber);
2242+ var mempty22 = /* @__PURE__ */ mempty(monoidUnit);
2242 var intercalate3 = /* @__PURE__ */ intercalate2(monoidString);
2243 var intercalate3 = /* @__PURE__ */ intercalate2(monoidString);
2243 var map2 = /* @__PURE__ */ map(/* @__PURE__ */ functorWriterT(functorIdentity));
2244 var map2 = /* @__PURE__ */ map(/* @__PURE__ */ functorWriterT(functorIdentity));
2244 var map1 = /* @__PURE__ */ map(functorArray);
2245 var map1 = /* @__PURE__ */ map(functorArray);
@@ -2718,7 +2719,7 @@
2718 var tell2 = /* @__PURE__ */ tell(/* @__PURE__ */ monadTellWriterT(monoidSkinGrowth)(monadIdentity));
2719 var tell2 = /* @__PURE__ */ tell(/* @__PURE__ */ monadTellWriterT(monoidSkinGrowth)(monadIdentity));
2719 var applicativeWriterT2 = /* @__PURE__ */ applicativeWriterT(monoidSkinGrowth)(applicativeIdentity);
2720 var applicativeWriterT2 = /* @__PURE__ */ applicativeWriterT(monoidSkinGrowth)(applicativeIdentity);
2720 var pure2 = /* @__PURE__ */ pure(applicativeWriterT2);
2721 var pure2 = /* @__PURE__ */ pure(applicativeWriterT2);
2721− var mempty22 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidWriterT(applicativeIdentity)(monoidSkinGrowth)(monoidArray));
2722+ var mempty3 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidWriterT(applicativeIdentity)(monoidSkinGrowth)(monoidArray));
2722 var traverse2 = /* @__PURE__ */ traverse(traversableArray)(applicativeWriterT2);
2723 var traverse2 = /* @__PURE__ */ traverse(traversableArray)(applicativeWriterT2);
2723 var traverseWithIndex2 = /* @__PURE__ */ traverseWithIndex(traversableWithIndexObject)(applicativeWriterT2);
2724 var traverseWithIndex2 = /* @__PURE__ */ traverseWithIndex(traversableWithIndexObject)(applicativeWriterT2);
2724 var monoidMutation = {
2725 var monoidMutation = {
@@ -2729,14 +2730,14 @@
2729 return semigroupMutation;
2730 return semigroupMutation;
2730 }
2731 }
2731 };
2732 };
2732− var mempty3 = /* @__PURE__ */ mempty(monoidMutation);
2733+ var mempty4 = /* @__PURE__ */ mempty(monoidMutation);
2733 var monoidGenericUI = function(dictMonoid) {
2734 var monoidGenericUI = function(dictMonoid) {
2734− var mempty42 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
2735+ var mempty52 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
2735 var semigroupGenericUI1 = semigroupGenericUI(dictMonoid.Semigroup0());
2736 var semigroupGenericUI1 = semigroupGenericUI(dictMonoid.Semigroup0());
2736 return function(dictMonoid1) {
2737 return function(dictMonoid1) {
2737 var semigroupGenericUI2 = semigroupGenericUI1(dictMonoid1.Semigroup0());
2738 var semigroupGenericUI2 = semigroupGenericUI1(dictMonoid1.Semigroup0());
2738 return {
2739 return {
2739− mempty: new UI(mempty42, mempty(dictMonoid1)),
2740+ mempty: new UI(mempty52, mempty(dictMonoid1)),
2740 Semigroup0: function() {
2741 Semigroup0: function() {
2741 return semigroupGenericUI2;
2742 return semigroupGenericUI2;
2742 }
2743 }
@@ -2897,11 +2898,11 @@
2897 ;
2898 ;
2898 if (v instanceof Align) {
2899 if (v instanceof Align) {
2899 if (ctx instanceof Generic) {
2900 if (ctx instanceof Generic) {
2900− return mempty22;
2901+ return mempty3;
2901 }
2902 }
2902 ;
2903 ;
2903 if (ctx instanceof Span) {
2904 if (ctx instanceof Span) {
2904− return mempty22;
2905+ return mempty3;
2905 }
2906 }
2906 ;
2907 ;
2907 if (ctx instanceof Grid) {
2908 if (ctx instanceof Grid) {
@@ -3031,33 +3032,40 @@
3031 throw new Error("Failed pattern match at Plum.View (line 297, column 12 - line 355, column 46): " + [v.constructor.name]);
3032 throw new Error("Failed pattern match at Plum.View (line 297, column 12 - line 355, column 46): " + [v.constructor.name]);
3032 };
3033 };
3033 };
3034 };
3035+ var onMouseDown = function(dictMonoid) {
3036+ var mempty52 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
3037+ return function(v) {
3038+ return new UI({
3039+ nerves: mempty52.nerves,
3040+ meat: mempty52.meat,
3041+ hover: mempty52.hover,
3042+ children: mempty52.children,
3043+ down: v.value0.meat
3044+ }, v.value1);
3045+ };
3046+ };
3034 var onHover = function(dictMonoid) {
3047 var onHover = function(dictMonoid) {
3035− var mempty42 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
3048+ var mempty52 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
3036− return function(dictMonoid1) {
3049+ return function(v) {
3037− return function(v) {
3038− return new UI({
3050+ return new UI({
3039− nerves: mempty42.nerves,
3051+ nerves: mempty52.nerves,
3040− meat: mempty42.meat,
3052+ meat: mempty52.meat,
3041− down: mempty42.down,
3053+ down: mempty52.down,
3042− children: mempty42.children,
3054+ children: mempty52.children,
3043− hover: v.value0.meat
3055+ hover: v.value0.meat
3044− }, v.value1);
3056+ }, v.value1);
3045− };
3046 };
3057 };
3047 };
3058 };
3048 var m = function(dictMonoid) {
3059 var m = function(dictMonoid) {
3049− var mempty42 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
3060+ var mempty52 = mempty(monoidRecord2(monoidRecordCons2(dictMonoid)()(monoidRecordCons1)));
3050− return function(dictMonoid1) {
3061+ return function(meat) {
3051− var mempty5 = mempty(dictMonoid1);
3052− return function(meat) {
3053− return new UI({
3062+ return new UI({
3054− nerves: mempty42.nerves,
3063+ nerves: mempty52.nerves,
3055− hover: mempty42.hover,
3064+ hover: mempty52.hover,
3056− down: mempty42.down,
3065+ down: mempty52.down,
3057− children: mempty42.children,
3066+ children: mempty52.children,
3058− meat: [meat]
3067+ meat: [meat]
3059− }, mempty5);
3068+ }, mempty22);
3060− };
3061 };
3069 };
3062 };
3070 };
3063 var hWith = function(elem2) {
3071 var hWith = function(elem2) {
@@ -3086,10 +3094,10 @@
3086 var widthFill = [new Width(Fill.value), new Height(Fill.value)];
3094 var widthFill = [new Width(Fill.value), new Height(Fill.value)];
3087 var alignCenter = [new Align(X.value, Center.value), new Align(Y.value, Center.value)];
3095 var alignCenter = [new Align(X.value, Center.value), new Align(Y.value, Center.value)];
3088 var skn = function(ctx) {
3096 var skn = function(ctx) {
3089− return bind2(map2(function($511) {
3097+ return bind2(map2(function($482) {
3090 return function(v2) {
3098 return function(v2) {
3091 return append2(v2)(v.extraSkin);
3099 return append2(v2)(v.extraSkin);
3092− }(concat($511));
3100+ }(concat($482));
3093 })(traverse2(skin(ctx))(append2(v1.value0.meat)(append2(function() {
3101 })(traverse2(skin(ctx))(append2(v1.value0.meat)(append2(function() {
3094 if (ctx instanceof Span) {
3102 if (ctx instanceof Span) {
3095 return mempty2;
3103 return mempty2;
@@ -3156,7 +3164,7 @@
3156 ;
3164 ;
3157 if (v1.value1 instanceof Wrapper) {
3165 if (v1.value1 instanceof Wrapper) {
3158 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3166 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3159− return bind2(growSkin(fire)(mempty3)(v1.value1.value0))(function(x$prime) {
3167+ return bind2(growSkin(fire)(mempty4)(v1.value1.value0))(function(x$prime) {
3160 return pure2(h3("div")(classes)([x$prime]));
3168 return pure2(h3("div")(classes)([x$prime]));
3161 });
3169 });
3162 });
3170 });
@@ -3176,7 +3184,7 @@
3176 ;
3184 ;
3177 if (v1.value1 instanceof Row) {
3185 if (v1.value1 instanceof Row) {
3178 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3186 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3179− return bind2(traverse2(growSkin(fire)(mempty3))(v1.value1.value0))(function(children$prime) {
3187+ return bind2(traverse2(growSkin(fire)(mempty4))(v1.value1.value0))(function(children$prime) {
3180 return pure2(h3("div")(classes)(children$prime));
3188 return pure2(h3("div")(classes)(children$prime));
3181 });
3189 });
3182 });
3190 });
@@ -3184,7 +3192,7 @@
3184 ;
3192 ;
3185 if (v1.value1 instanceof Column) {
3193 if (v1.value1 instanceof Column) {
3186 return bind2(append22(skn(new Flexbox(Y.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-column")("flex-direction")("column"))))(function(classes) {
3194 return bind2(append22(skn(new Flexbox(Y.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-column")("flex-direction")("column"))))(function(classes) {
3187− return bind2(traverse2(growSkin(fire)(mempty3))(v1.value1.value0))(function(children$prime) {
3195+ return bind2(traverse2(growSkin(fire)(mempty4))(v1.value1.value0))(function(children$prime) {
3188 return pure2(h3("div")(classes)(children$prime));
3196 return pure2(h3("div")(classes)(children$prime));
3189 });
3197 });
3190 });
3198 });
@@ -3192,7 +3200,7 @@
3192 ;
3200 ;
3193 if (v1.value1 instanceof Link) {
3201 if (v1.value1 instanceof Link) {
3194 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3202 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3195− return bind2(growSkin(fire)(mempty3)(v1.value1.value2))(function(child$prime) {
3203+ return bind2(growSkin(fire)(mempty4)(v1.value1.value2))(function(child$prime) {
3196 return pure2(hWith("a")({
3204 return pure2(hWith("a")({
3197 href: v1.value1.value0,
3205 href: v1.value1.value0,
3198 rel: "noopener noreferrer",
3206 rel: "noopener noreferrer",
@@ -3210,7 +3218,7 @@
3210 ;
3218 ;
3211 if (v1.value1 instanceof Download) {
3219 if (v1.value1 instanceof Download) {
3212 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3220 return bind2(append22(skn(new Flexbox(X.value)))(append22(sk("display-flex")("display")("flex"))(sk("flex-direction-row")("flex-direction")("row"))))(function(classes) {
3213− return bind2(growSkin(fire)(mempty3)(v1.value1.value2))(function(child$prime) {
3221+ return bind2(growSkin(fire)(mempty4)(v1.value1.value2))(function(child$prime) {
3214 return pure2(hWith("a")({
3222 return pure2(hWith("a")({
3215 href: v1.value1.value0,
3223 href: v1.value1.value0,
3216 download: fromMaybe("")(v1.value1.value1.filename)
3224 download: fromMaybe("")(v1.value1.value1.filename)
@@ -3238,7 +3246,7 @@
3238 };
3246 };
3239 var grow = function(fire) {
3247 var grow = function(fire) {
3240 return function(v) {
3248 return function(v) {
3241− var v1 = runWriter(growSkin(fire)(mempty3)(v));
3249+ var v1 = runWriter(growSkin(fire)(mempty4)(v));
3242 return {
3250 return {
3243 node: v1.value0,
3251 node: v1.value0,
3244 style: styleSkinGrowth(v1.value1)
3252 style: styleSkinGrowth(v1.value1)
@@ -3261,11 +3269,8 @@
3261 };
3269 };
3262 var bgColor = function(dictMonoid) {
3270 var bgColor = function(dictMonoid) {
3263 var m1 = m(dictMonoid);
3271 var m1 = m(dictMonoid);
3264− return function(dictMonoid1) {
3272+ return function(c) {
3265− var m2 = m1(dictMonoid1);
3266− return function(c) {
3267− return m2(new BackgroundColor(c));
3273+ return m1(new BackgroundColor(c));
3268− };
3269 };
3274 };
3270 };
3275 };
3271
3276
@@ -3368,17 +3373,22 @@
3368
3373
3369 // output/Main/index.js
3374 // output/Main/index.js
3370 var pure3 = /* @__PURE__ */ pure(applicativeEffect);
3375 var pure3 = /* @__PURE__ */ pure(applicativeEffect);
3371− var discard3 = /* @__PURE__ */ discard(discardUnit)(/* @__PURE__ */ bindGenericUI(monoidArray));
3376+ var discard3 = /* @__PURE__ */ discard(discardUnit);
3377+ var discard1 = /* @__PURE__ */ discard3(/* @__PURE__ */ bindGenericUI(monoidArray));
3378+ var discard22 = /* @__PURE__ */ discard3(/* @__PURE__ */ bindGenericUI(monoidUnit));
3372− var onHover2 = /* @__PURE__ */ onHover(monoidUnit)(monoidUnit);
3379+ var onHover2 = /* @__PURE__ */ onHover(monoidUnit);
3373− var bgColor2 = /* @__PURE__ */ bgColor(monoidUnit)(monoidUnit);
3380+ var bgColor2 = /* @__PURE__ */ bgColor(monoidUnit);
3381+ var onMouseDown2 = /* @__PURE__ */ onMouseDown(monoidUnit);
3374− var mempty4 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidGenericUI(monoidUnit)(monoidUnit));
3382+ var mempty5 = /* @__PURE__ */ mempty(/* @__PURE__ */ monoidGenericUI(monoidUnit)(monoidUnit));
3375 var plum = {
3383 var plum = {
3376 init: /* @__PURE__ */ pure3({
3384 init: /* @__PURE__ */ pure3({
3377 text: "Test"
3385 text: "Test"
3378 }),
3386 }),
3379 view: function(model) {
3387 view: function(model) {
3380− return column(discard3(text("hi")(onHover2(bgColor2(rgb(1)(0)(0)))))(function() {
3388+ return column(discard1(text("hi")(discard22(onHover2(bgColor2(rgb(1)(0)(0))))(function() {
3389+ return onMouseDown2(bgColor2(rgb(0)(1)(0)));
3390+ })))(function() {
3381− return text("hello")(mempty4);
3391+ return text("hello")(mempty5);
3382 }));
3392 }));
3383 },
3393 },
3384 update: function(msg) {
3394 update: function(msg) {
plum/src/Main.purs+5−4
@@ -2,7 +2,6 @@ module Main where
2
2
3import Prelude
3import Prelude
4
4
5−import Data.Array as Array
6import Effect (Effect)
5import Effect (Effect)
7import Plum as Plum
6import Plum as Plum
8import Plum.View
7import Plum.View
@@ -17,10 +16,12 @@ plum :: Plum.Plum Unit Model
17plum =
16plum =
18 { init: pure { text: "Test" }
17 { init: pure { text: "Test" }
19 , view: \model -> do
18 , view: \model -> do
20− column $ do
19+ column do
21− text "hi" $ do
20+ text "hi" do
22− onHover $ do
21+ onHover do
23 bgColor $ rgb 1.0 0.0 0.0
22 bgColor $ rgb 1.0 0.0 0.0
23+ onMouseDown $ do
24+ bgColor $ rgb 0.0 1.0 0.0
24 text "hello" mempty
25 text "hello" mempty
25 , update: \msg model -> case msg of
26 , update: \msg model -> case msg of
26 _ -> pure { text: "Button pressed" }
27 _ -> pure { text: "Button pressed" }
plum/src/Plum/View.purs+16−16
@@ -194,52 +194,52 @@ data Alignment = Start | Center | End
194
194
195data Direction = X | Y
195data Direction = X | Y
196
196
197−m :: forall ch msg a. Monoid ch => Monoid a => Meat -> GenericUI ch msg a
197+m :: forall ch msg. Monoid ch => Meat -> GenericUI ch msg Unit
198m meat = UI (mempty :: GenericUIView ch msg) { meat = [ meat ] } mempty
198m meat = UI (mempty :: GenericUIView ch msg) { meat = [ meat ] } mempty
199
199
200−spacing :: forall ch msg a. Monoid ch => Monoid a => { x :: Int, y :: Int } -> GenericUI ch msg a
200+spacing :: forall ch msg. Monoid ch => { x :: Int, y :: Int } -> GenericUI ch msg Unit
201spacing { x, y } = m $ Spacing x y
201spacing { x, y } = m $ Spacing x y
202
202
203−explain :: forall ch msg a. Monoid ch => Monoid a => GenericUI ch msg a
203+explain :: forall ch msg. Monoid ch => GenericUI ch msg Unit
204explain = m Explain
204explain = m Explain
205
205
206−align :: forall ch msg a. Monoid ch => Monoid a => Direction -> Alignment -> GenericUI ch msg a
206+align :: forall ch msg. Monoid ch => Direction -> Alignment -> GenericUI ch msg Unit
207align dir al = m $ Align dir al
207align dir al = m $ Align dir al
208
208
209−width :: forall ch msg a. Monoid ch => Monoid a => Length -> GenericUI ch msg a
209+width :: forall ch msg. Monoid ch => Length -> GenericUI ch msg Unit
210width l = m $ Width l
210width l = m $ Width l
211
211
212−height :: forall ch msg a. Monoid ch => Monoid a => Length -> GenericUI ch msg a
212+height :: forall ch msg. Monoid ch => Length -> GenericUI ch msg Unit
213height l = m $ Height l
213height l = m $ Height l
214
214
215−wrapped :: forall ch msg a. Monoid ch => Monoid a => GenericUI ch msg a
215+wrapped :: forall ch msg. Monoid ch => GenericUI ch msg Unit
216wrapped = m Wrapped
216wrapped = m Wrapped
217
217
218−bgColor :: forall ch msg a. Monoid ch => Monoid a => Color -> GenericUI ch msg a
218+bgColor :: forall ch msg. Monoid ch => Color -> GenericUI ch msg Unit
219bgColor c = m $ BackgroundColor c
219bgColor c = m $ BackgroundColor c
220
220
221−padding :: forall ch msg a. Monoid ch => Monoid a => Side -> Int -> GenericUI ch msg a
221+padding :: forall ch msg. Monoid ch => Side -> Int -> GenericUI ch msg Unit
222padding s l = m $ Padding s l
222padding s l = m $ Padding s l
223
223
224−spread :: forall ch msg a. Monoid ch => Monoid a => GenericUI ch msg a
224+spread :: forall ch msg. Monoid ch => GenericUI ch msg Unit
225spread = m Spread
225spread = m Spread
226
226
227−opacity :: forall ch msg a. Monoid ch => Monoid a => Number -> GenericUI ch msg a
227+opacity :: forall ch msg. Monoid ch => Number -> GenericUI ch msg Unit
228opacity o = m $ Opacity o
228opacity o = m $ Opacity o
229
229
230−pointer :: forall ch msg a. Monoid ch => Monoid a => GenericUI ch msg a
230+pointer :: forall ch msg. Monoid ch => GenericUI ch msg Unit
231pointer = m Pointer
231pointer = m Pointer
232
232
233−move :: forall ch msg a. Monoid ch => Monoid a => { x :: Int, y :: Int } -> GenericUI ch msg a
233+move :: forall ch msg. Monoid ch => { x :: Int, y :: Int } -> GenericUI ch msg Unit
234move a = m $ Move a
234move a = m $ Move a
235
235
236−clip :: forall ch msg a. Monoid ch => Monoid a => Direction -> GenericUI ch msg a
236+clip :: forall ch msg. Monoid ch => Direction -> GenericUI ch msg Unit
237clip dir = m $ Clip dir
237clip dir = m $ Clip dir
238
238
239−onHover :: forall ch msg a. Monoid ch => Monoid a => GenericUI Unit msg a -> GenericUI ch msg a
239+onHover :: forall ch msg. Monoid ch => GenericUI Unit msg Unit -> GenericUI ch msg Unit
240onHover (UI { meat } a) = UI (mempty :: GenericUIView ch msg) { hover = meat } a
240onHover (UI { meat } a) = UI (mempty :: GenericUIView ch msg) { hover = meat } a
241
241
242−onMouseDown :: forall ch msg a. Monoid ch => Monoid a => GenericUI Unit msg a -> GenericUI ch msg a
242+onMouseDown :: forall ch msg. Monoid ch => GenericUI Unit msg Unit -> GenericUI ch msg Unit
243onMouseDown (UI { meat } a) = UI (mempty :: GenericUIView ch msg) { down = meat } a
243onMouseDown (UI { meat } a) = UI (mempty :: GenericUIView ch msg) { down = meat } a
244
244
245data Meat
245data Meat