Skip to content

Commit

Permalink
Add implementation for (+++)
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-tielen committed Feb 21, 2022
1 parent d4fd6e8 commit e38719e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Language/Souffle/Analysis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,13 @@ instance (Monad m, Monoid (m ())) => ArrowChoice (Analysis m) where
left = left'

right = right'

Analysis f1 r1 g1 +++ Analysis f2 r2 g2 = Analysis f' (r1 <> r2) g'
where
f' = \case
Left b -> f1 b
Right b' -> f2 b'
g' = \case
Left b -> Left <$> g1 b
Right b' -> Right <$> g2 b'

0 comments on commit e38719e

Please sign in to comment.