{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
#ifdef USE_REFLEX_OPTIMIZER
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
#endif
module Reflex.EventWriter.Class
( EventWriter (..)
) where
import Control.Monad.Reader (ReaderT, lift)
import Data.Semigroup (Semigroup)
import Reflex.Class (Event)
class (Monad m, Semigroup w) => EventWriter t w m | m -> t w where
tellEvent :: Event t w -> m ()
instance EventWriter t w m => EventWriter t w (ReaderT r m) where
tellEvent = lift . tellEvent