From e1c7ed58aacb46c8204461841d29cb790cdf76e7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 30 Jul 2016 17:05:49 +0200 Subject: code cleanup --- events/src/Events/Types.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'events/src/Events/Types.hs') diff --git a/events/src/Events/Types.hs b/events/src/Events/Types.hs index 711e200..5320bb3 100644 --- a/events/src/Events/Types.hs +++ b/events/src/Events/Types.hs @@ -11,6 +11,7 @@ module Events.Types , module Data.Default.Class , module Events.Types.NDT , module Control.Monad.State.Lazy + , module Control.Monad.Reader ) where import Control.Lens.TH (makeLenses) @@ -25,6 +26,7 @@ import Data.Default.Class import Events.Types.NDT (NDT, foldNDT) import Control.Monad.State.Lazy +import Control.Monad.Reader data TimeRange = TimeRange { _rangeStart :: UTCTime @@ -64,7 +66,7 @@ instance Default ObjCtx where objCtx :: Traversal' ObjCtx Object objCtx fObj ctx - | _objOccurs ctx = traverseOf (objPayload . _Just) fObj ctx - | otherwise = pure ctx + | ctx ^. objOccurs = traverseOf (objPayload . _Just) fObj ctx + | otherwise = pure ctx -type Eval m a = StateT ObjCtx (NDT (StateT EvalCtx m)) a +type Eval m a = StateT ObjCtx (NDT (ReaderT EvalCtx m)) a -- cgit v1.2.3