Skip to content

Commit

Permalink
Revert "simplify runClause"
Browse files Browse the repository at this point in the history
This reverts commit ad0975a.
  • Loading branch information
goolord committed Jun 8, 2021
1 parent ad0975a commit ecfd8eb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -500,7 +500,9 @@ applyRuleInternal ep vp goSTS jc r =
runClause (SubTrans (subCtx :: RuleContext _rtype sub) next) = do
((ss, sfails), sevents) :: ((State sub, [[PredicateFailure sub]]), [Event sub]) <- lift $ goSTS subCtx
traverse_ (\a -> modify (a :)) $ wrapFailed @sub @s <$> concat sfails
runClause $ Writer (fmap wrapEvent sevents) ()
() <- case ep of
EPDiscard -> pure ()
EPReturn -> tell $ fmap wrapEvent sevents
pure $ next ss
runClause (Writer w a) = case ep of
EPReturn -> tell w $> a
Expand Down

0 comments on commit ecfd8eb

Please sign in to comment.