{-# OPTIONS_GHC -Wno-orphans #-}

module Control.Monad.Class.MonadTime.Trans () where

import           Control.Monad.Cont
import           Control.Monad.Except
import qualified Control.Monad.RWS.Lazy as Lazy
import qualified Control.Monad.RWS.Strict as Strict
import qualified Control.Monad.State.Lazy as Lazy
import qualified Control.Monad.State.Strict as Strict
import qualified Control.Monad.Writer.Lazy as Lazy
import qualified Control.Monad.Writer.Strict as Strict

import           Control.Monad.Class.MonadTime

instance MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (ExceptT e m) where
  getMonotonicTimeNSec :: ExceptT e m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (Lazy.StateT s m) where
  getMonotonicTimeNSec :: StateT s m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (Strict.StateT s m) where
  getMonotonicTimeNSec :: StateT s m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance (Monoid w, MonadMonotonicTimeNSec m) => MonadMonotonicTimeNSec (Lazy.WriterT w m) where
  getMonotonicTimeNSec :: WriterT w m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance (Monoid w, MonadMonotonicTimeNSec m) => MonadMonotonicTimeNSec (Strict.WriterT w m) where
  getMonotonicTimeNSec :: WriterT w m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance (Monoid w, MonadMonotonicTimeNSec m) => MonadMonotonicTimeNSec (Lazy.RWST r w s m) where
  getMonotonicTimeNSec :: RWST r w s m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance (Monoid w, MonadMonotonicTimeNSec m) => MonadMonotonicTimeNSec (Strict.RWST r w s m) where
  getMonotonicTimeNSec :: RWST r w s m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (ContT r m) where
  getMonotonicTimeNSec :: ContT r m Word64
getMonotonicTimeNSec = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadMonotonicTimeNSec m => m Word64
getMonotonicTimeNSec

instance MonadTime m => MonadTime (ExceptT e m) where
  getCurrentTime :: ExceptT e m UTCTime
getCurrentTime   = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance MonadTime m => MonadTime (Lazy.StateT s m) where
  getCurrentTime :: StateT s m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance MonadTime m => MonadTime (Strict.StateT s m) where
  getCurrentTime :: StateT s m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance (Monoid w, MonadTime m) => MonadTime (Lazy.WriterT w m) where
  getCurrentTime :: WriterT w m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance (Monoid w, MonadTime m) => MonadTime (Strict.WriterT w m) where
  getCurrentTime :: WriterT w m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance (Monoid w, MonadTime m) => MonadTime (Lazy.RWST r w s m) where
  getCurrentTime :: RWST r w s m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance (Monoid w, MonadTime m) => MonadTime (Strict.RWST r w s m) where
  getCurrentTime :: RWST r w s m UTCTime
getCurrentTime = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime

instance MonadTime m => MonadTime (ContT r m) where
  getCurrentTime :: ContT r m UTCTime
getCurrentTime   = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTime m => m UTCTime
getCurrentTime