rhine-0.1.0.0: src/FRP/Rhine/Clock/Count.hs
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module FRP.Rhine.Clock.Count where
-- rhine
import FRP.Rhine
-- | A singleton clock that counts the ticks.
data Count = Count -- Sesame street anyone?
instance Monad m => Clock m Count where
type TimeDomainOf Count = Integer
type Tag Count = ()
startClock _ = return (count &&& arr (const ()), 0)