[Haskell-cafe] Applicative of Applicative

Tony Morris tmorris at tmorris.net
Mon Mar 23 21:50:10 UTC 2015


This package is geared toward your specific question.

https://hackage.haskell.org/package/TypeCompose

On Tue, Mar 24, 2015 at 7:02 AM, martin <martin.drautzburg at web.de> wrote:

> Hello all,
>
> I've been playing with temporal values, i.e. values which change over time
> at discrete points in time. I thought it
> would be good to make it an instance of Applicative and I was pleased with
> the results. I may be re-inventing some of
> frp here, but hey.
>
> Then I wondered how I would replace one Temporal by another at some point
> in time. Kind of like switching from summer
> schedule to winter schedule. Or switching channels on the TV, where each
> channel is a Temporal Image.
>
> It seems that by stacking up Temporals in this way, I could theoretically
> start with sample values and abstract my way
> up to a symphony. What is unclear to me is the following: when I have two
> Temporal Ints, I know what (+) <$> does. It
> operates on the Ints. But when I have Temporal Temporal Ints, then the
> function before the <$> would operate on the next
> level, i.e. it has to be a function which accepts a Temporal.
>
> But a Temporal Temporal Int can always be flattened into a Temporal Int.
> So I may just as well ask to apply a function
> to the bottom level, namely the Ints.
>
> How to I choose how deep down I want to reach? And any other guidance will
> also be much appreciated.
>
> Martin
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150324/4a6e8970/attachment.html>


More information about the Haskell-Cafe mailing list