Commit d1f22396 authored by bitonic's avatar bitonic Committed by Ben Gamari

Clarify scope of `getQ`/`putQ` state.

The current haddocks do not specify the scope of the state manipulated
by `getQ`/`putQ`.

Reviewers: austin, goldfire, bgamari, ezyang

Reviewed By: ezyang

Subscribers: ezyang, thomie

Differential Revision: https://phabricator.haskell.org/D2497
parent d40d6df7
......@@ -465,11 +465,13 @@ addTopDecls ds = Q (qAddTopDecls ds)
addModFinalizer :: Q () -> Q ()
addModFinalizer act = Q (qAddModFinalizer (unQ act))
-- | Get state from the 'Q' monad.
-- | Get state from the 'Q' monad. Note that the state is local to the
-- Haskell module in which the Template Haskell expression is executed.
getQ :: Typeable a => Q (Maybe a)
getQ = Q qGetQ
-- | Replace the state in the 'Q' monad.
-- | Replace the state in the 'Q' monad. Note that the state is local to the
-- Haskell module in which the Template Haskell expression is executed.
putQ :: Typeable a => a -> Q ()
putQ x = Q (qPutQ x)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment