summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events/src/Events/Types.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/events/src/Events/Types.hs b/events/src/Events/Types.hs
index 1f41454..54aa34d 100644
--- a/events/src/Events/Types.hs
+++ b/events/src/Events/Types.hs
@@ -19,7 +19,7 @@ import Data.Aeson (Object)
19 19
20import Data.Time.Clock 20import Data.Time.Clock
21 21
22import Control.Monad.Reader 22import Control.Monad.State.Lazy
23import ListT (ListT) 23import ListT (ListT)
24import qualified ListT 24import qualified ListT
25 25
@@ -54,9 +54,9 @@ instance Default SpecCtx where
54 , _ctxEvents = mempty 54 , _ctxEvents = mempty
55 } 55 }
56 56
57type Spec m a = ListT (ReaderT SpecCtx m) a 57type Spec m a = ListT (StateT SpecCtx m) a
58 58
59interpret :: MonadFix m => Spec m (Maybe Event) -> m [Event] 59interpret :: MonadFix m => Spec m (Maybe Event) -> m [Event]
60interpret x = catMaybes <$> mfix x' 60interpret x = catMaybes <$> mfix x'
61 where 61 where
62 x' = runReaderT (ListT.toList x) . flip (set ctxEvents) def . catMaybes 62 x' = evalStateT (ListT.toList x) . flip (set ctxEvents) def . catMaybes