Instead of
select $ do
(x,y,z) <- from
where_ (z^.f ==. y^.f)
return (x, y^.f, z)
now you may write
select $
from $ \(x,y,z) -> do
where_ (z^.f ==. y^.f)
return (x, y^.f, z)
Now the only difference in reading order wrt. SQL is the return
on the bottom of the expression. =)
Note that this does not change at all the expressivity of the
language since
oldFrom = from return
|
||
|---|---|---|
| src/Database | ||
| .gitignore | ||
| esqueleto.cabal | ||
| LICENSE | ||
| README | ||
| Setup.hs | ||