diff --git a/src/Control/Monad/Freer/Reader.hs b/src/Control/Monad/Freer/Reader.hs index f40a1c5..96dae19 100644 --- a/src/Control/Monad/Freer/Reader.hs +++ b/src/Control/Monad/Freer/Reader.hs @@ -63,16 +63,16 @@ ask = send Reader -- | Request a value of the environment, and apply as selector\/projection -- function to it. asks - :: (e -> a) + :: Member (Reader e) effs + => (e -> a) -- ^ The selector\/projection function to be applied to the environment. - -> Eff '[Reader e] a + -> Eff effs a asks f = f <$> ask -- | Handler for 'Reader' effects. runReader :: Eff (Reader e ': effs) a -> e -> Eff effs a runReader m e = handleRelay pure (\Reader k -> k e) m - -- | Locally rebind the value in the dynamic environment. -- -- This function is like a relay; it is both an admin for 'Reader' requests,