1
1
mirror of https://github.com/qfpl/applied-fp-course.git synced 2024-11-22 19:34:33 +03:00

Removed premature references to transformer stack in src/Level06/Core.hs comments.

This commit is contained in:
Nick Hamilton 2018-06-12 17:00:56 +02:00
parent fca8d45f87
commit 0ca5b53710

View File

@ -130,19 +130,6 @@ handleRequest
-> RqType
-> AppM Response
handleRequest db rqType =
-- Now that we're operating within the context of our AppM, which is a
-- ReaderT, we're able to access the values stored in the Env.
--
-- Two functions that allow us to access the data stored in our ReaderT are:
-- ask :: MonadReader r m => m r
-- &
-- asks :: MonadReader r m => (r -> a) -> m a
--
-- We will use ``asks`` here as we only want the FirstAppDB, so...
-- > envDb :: Env -> FirstAppDB
-- > AppM :: ReaderT Env IO a
-- > asks :: (Env -> a) -> AppM a
-- > asks envDb :: AppM FirstAppDB
case rqType of
-- Exercise for later: Could this be generalised to clean up the repetition ?
AddRq t c -> resp200 PlainText "Success" <$ DB.addCommentToTopic db t c