[Fieldtrip] Re: [reactive] Transforming Behaviors
Conal Elliott
conal at conal.net
Mon Nov 24 21:34:48 EST 2008
Ah, I didn't foresee those ambiguities, but now I see what you mean. I've
added your instance below (exactly how this sort of thing comes out for me
as well), used in Test.hs, and pushed & released reactive-fieldtrip-0.0.4.
And yeah, adding a 'pure' to promote static to dynamic is pretty easy.
Note that now Test.hs imports FRP.Reactive.FieldTrip (a new
collect/re-export module) instead of FRP.Reactive.FieldTrip.Adapter.
Thanks for the suggestion, Greg.
- Conal
On Mon, Nov 24, 2008 at 3:56 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> >> static transformations of dynamic geometry.
> >> dynamic transformation of static geometry and dynamic transformation of
> >> dynamic geometry. And the corresponding three additional instances for
> 2D
> >> geometry. All six would be very useful.
>
> Implementing just the dynamic transformation of dynamic geometry seems
> to work out best.
>
> instance Transform xf a => Transform (Behavior xf) (Behavior a) where
> (*%) = liftA2 (*%)
>
> With the other instances, GHC complains about ambiguities, and it's
> easy enough to pull either side up into the dynamic realm.
>
> Thanks,
> Greg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/fieldtrip/attachments/20081124/36e04f50/attachment.htm
More information about the FieldTrip
mailing list