diff options
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/exts/deriving_extra.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/exts/template_haskell.rst | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/users_guide/exts/deriving_extra.rst b/docs/users_guide/exts/deriving_extra.rst index 1352170af7..e1d63c4b65 100644 --- a/docs/users_guide/exts/deriving_extra.rst +++ b/docs/users_guide/exts/deriving_extra.rst @@ -528,7 +528,7 @@ Deriving ``Lift`` instances The class ``Lift``, unlike other derivable classes, lives in ``template-haskell`` instead of ``base``. Having a data type be an instance of ``Lift`` permits its values to be promoted to Template Haskell expressions (of -type ``ExpQ`` and ``TExpQ a``), which can then be spliced into Haskell source +type ``ExpQ`` and ``Code Q a``), which can then be spliced into Haskell source code. Here is an example of how one can derive ``Lift``: diff --git a/docs/users_guide/exts/template_haskell.rst b/docs/users_guide/exts/template_haskell.rst index f1319b904e..a33949a1f1 100644 --- a/docs/users_guide/exts/template_haskell.rst +++ b/docs/users_guide/exts/template_haskell.rst @@ -133,15 +133,15 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under is an arbitrary expression. A top-level typed expression splice can occur in place of an expression; the - spliced expression must have type ``Q (TExp a)`` + spliced expression must have type ``Code Q a`` - A *typed* expression quotation is written as ``[|| ... ||]``, or ``[e|| ... ||]``, where the "..." is an expression; if the "..." expression has type ``a``, then the quotation has type - ``Quote m => m (TExp a)``. + ``Quote m => Code m a``. - Values of type ``TExp a`` may be converted to values of type ``Exp`` - using the function ``unType :: TExp a -> Exp``. + It is possible to extract a value of type ``m Exp`` from ``Code m a`` + using the ``unTypeCode :: Code m a -> m Exp`` function. - A quasi-quotation can appear in a pattern, type, expression, or declaration context and is also written in Oxford brackets: @@ -202,7 +202,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under class Lift t where lift :: Quote m => t -> m Exp - liftTyped :: Quote m => t -> m (TExp t) + liftTyped :: Quote m => t -> Code m t In general, if GHC sees an expression within Oxford brackets (e.g., ``[| foo bar |]``, then GHC looks up each name within the brackets. If a name |