Skip to content

Commit

Permalink
Exists can be written with banana brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
ocharles committed Mar 16, 2017
1 parent a10ecfb commit ea1d256
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/Example.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ heavyParts = proc _ -> do
existsExample :: Query (Part Expr)
existsExample = proc _ -> do
part <- queryTable -< ()
exists (proc part -> do
otherPart <- queryTable -< ()
where_ -< partWeight otherPart >. partWeight part) -< part
(| exists (do otherPart <- queryTable -< ()
where_ -< partWeight otherPart >. partWeight part) |)
returnA -< part

data Supplier f = Supplier
Expand Down

0 comments on commit ea1d256

Please sign in to comment.