summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-27 23:41:44 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-27 23:41:44 +0200
commit97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54 (patch)
tree69765b244e33897557f249ef6edece8604033496
parente04e707b1fb63b7857878e2d77c560abe3efd51b (diff)
downloadevents-97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54.tar
events-97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54.tar.gz
events-97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54.tar.bz2
events-97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54.tar.xz
events-97bde0359940a1f6fe2cdbc4bffb9bcaec2a0e54.zip
efficiency
-rw-r--r--events/src/Events/Types.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/events/src/Events/Types.hs b/events/src/Events/Types.hs
index 3414b68..22faf94 100644
--- a/events/src/Events/Types.hs
+++ b/events/src/Events/Types.hs
@@ -78,7 +78,7 @@ type Eval m a = StateT ObjCtx (ListT (StateT EvalCtx m)) a
78evaluate :: MonadFix m => Eval m () -> m [Object] 78evaluate :: MonadFix m => Eval m () -> m [Object]
79evaluate x = catMaybes <$> mfix x' 79evaluate x = catMaybes <$> mfix x'
80 where 80 where
81 x' = evalStateT (ListT.toList (objCtx <$> execStateT x def)) . flip (set ctxEvents) def . catMaybes 81 x' = evalStateT (ListT.toReverseList (objCtx <$> execStateT x def)) . flip (set ctxEvents) def . catMaybes
82 82
83instance MonadState s m => MonadState s (ListT m) where 83instance MonadState s m => MonadState s (ListT m) where
84 get = lift get 84 get = lift get