diff options
| -rw-r--r-- | events/src/Events/Types.hs | 6 |
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 | ||
| 20 | import Data.Time.Clock | 20 | import Data.Time.Clock |
| 21 | 21 | ||
| 22 | import Control.Monad.Reader | 22 | import Control.Monad.State.Lazy |
| 23 | import ListT (ListT) | 23 | import ListT (ListT) |
| 24 | import qualified ListT | 24 | import qualified ListT |
| 25 | 25 | ||
| @@ -54,9 +54,9 @@ instance Default SpecCtx where | |||
| 54 | , _ctxEvents = mempty | 54 | , _ctxEvents = mempty |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | type Spec m a = ListT (ReaderT SpecCtx m) a | 57 | type Spec m a = ListT (StateT SpecCtx m) a |
| 58 | 58 | ||
| 59 | interpret :: MonadFix m => Spec m (Maybe Event) -> m [Event] | 59 | interpret :: MonadFix m => Spec m (Maybe Event) -> m [Event] |
| 60 | interpret x = catMaybes <$> mfix x' | 60 | interpret 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 |
