on master help sign in
Reword Evaluate documentation
commitb4a542a85d5719d2559427b4319de7af35ce7e67 authorShane O'Brien <shane.obrien@circuithub.com> dateFri 18 Jun 2021, 17:21 (5 years ago) parent421fe3f
1 file changed+5−5
src/Rel8/Query/Evaluate.hs+5−5
src/Rel8/Query/Evaluate.hs+5−5
@@ -48,9 +48,9 @@ data Evaluations = Evaluations
4848-- | Some PostgreSQL functions, such as 'Rel8.nextval', have side effects,
4949-- breaking the referential transparency we would otherwise enjoy.
5050--
51−-- To try to recover our ability to reason about such expressions, 'Rel8'
52−-- provides the 'Evaluate' monad, which allows us to control the evaluation
53−-- order of side-effects by sequencing them monadically.
51+-- To try to recover our ability to reason about such expressions, 'Evaluate'
52+-- allows us to control the evaluation order of side-effects by sequencing
53+-- them monadically.
5454type Evaluate :: Type -> Type
5555newtype Evaluate a = Evaluate (State Evaluations a)
5656 deriving newtype (Functor, Apply, Applicative, Monad)
@@ -61,8 +61,8 @@ instance Bind Evaluate where
6161
6262
6363-- | 'eval' takes expressions that could potentially have side effects and
64−-- lifts them into the 'Evaluate' monad. The resulting expressions has no side
65−-- effetcs and can safely be reused.
64+-- \"runs\" them in the 'Evaluate' monad. The returned expressions have no
65+-- side effetcs and can safely be reused.
6666eval :: Table Expr a => a -> Evaluate a
6767eval a = Evaluate $ do
6868 Evaluations {tag, bindings} <- get