[reactive] Re: Representation Details of Events

David Sankel camior at gmail.com
Wed Nov 19 17:15:28 EST 2008


Thinking along those same lines, here are a couple interesting definitions:

-- If there is an occurrence, return the time of the first occurrence,
-- otherwise return +infty
firstETime :: Ord t => EventG t a -> Time t
firstETime = futTime . eFuture

-- If there is an occurrence, return the time of the first occurrence,
-- otherwise return _|_.
firstETime2 :: Ord t => EventG t a -> Time t
firstETime2 = firstE . withTimeGE_

On Wed, Nov 19, 2008 at 5:07 PM, David Sankel <camior at gmail.com> wrote:
> Consider these two events:
>
> a = []
> b = [(+infty, _|_)]
>
> Semantically, a and b are different values. Consider their
> representations in reactive:
>
> a = Event (Future ((Max MaxBound), (_|_)))
> b = Event (Future ((Max MaxBound), (_|_ `Stepper` a))))
>
> At the end of an event, the second element of the future tuple is
> bottom. Conversely, the second element of the future tuple is never
> bottom when not at the end of an event.
>
> There's no particular point to this post, just musing on my discovery
> of the above facts.
>
> --
> David Sankel
> Sankel Software
>



-- 
David Sankel
Sankel Software
www.sankelsoftware.com
585 617 4748 (Office)
585 309 2016 (Mobile)


More information about the Reactive mailing list