On Wed, Nov 5, 2008 at 6:57 PM, Conal Elliott <span dir="ltr"><<a href="mailto:conal.elliott@gmail.com">conal.elliott@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The 'changes' function would break through the step-function-of-time semantics of Reactive. In other words, I don't think you can specify the meaning of 'changes' in terms of the meaning of Reactive.</blockquote>
<div><br>I see what you mean: my implementation of changes only removes one kind of redundancy (reactive's simultaneous occurrences). It doesn't remove the redundancy where some occurrences may not change the value.<br>
<br>My next thought is, why not add an Eq parameter to the changes function and use that to remove the other redundancy? I'm thinking that could work in many cases, but in this case:<br><br><div style="margin-left: 40px;">
<span style="font-family: courier new,monospace;">data WiperMode = Normal { singleWipe :: Event ()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> , customWipe :: Event ()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | SlowWipe</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | ContinuousWipe</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | FastWipe</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">type WiperStick = Reactive WiperMode</span><br style="font-family: courier new,monospace;"></div><br>That would require me to have an Eq on WiperMode with the embedded events. I can't see a way to make that work.<br>
<br>I think I'll just change my example to be WiperStick = Event WiperMode with a condition that there exists an occurance at -infinity.<br><br>Hrm, I'm thinking this conversation should probably be on the reactive list. I'll cc it.<br>
<br>David<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888">
<br> - Conal</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Wed, Nov 5, 2008 at 1:47 PM, David Sankel <span dir="ltr"><<a href="mailto:camior@gmail.com" target="_blank">camior@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In this example (marked with the module it should go into).<br>
<br>
<a href="http://hpaste.org/11766" target="_blank">http://hpaste.org/11766</a><br>
<br>
Also, I've attached a patch to generalize the type of something.<br>
<br>
David<br></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Sankel<br>Sankel Software<br><a href="http://www.sankelsoftware.com">www.sankelsoftware.com</a><br>