From 99b5cce97dd56dbf993b9a12ebc6c126a100a780 Mon Sep 17 00:00:00 2001 From: parsonsmatt Date: Wed, 5 May 2021 17:40:34 -0600 Subject: Address review comments, export from TH --- libraries/template-haskell/Language/Haskell/TH.hs | 1 + libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libraries/template-haskell/Language') diff --git a/libraries/template-haskell/Language/Haskell/TH.hs b/libraries/template-haskell/Language/Haskell/TH.hs index 83432c14e3..14b37e8c12 100644 --- a/libraries/template-haskell/Language/Haskell/TH.hs +++ b/libraries/template-haskell/Language/Haskell/TH.hs @@ -22,6 +22,7 @@ module Language.Haskell.TH( -- *** Reify reify, -- :: Name -> Q Info reifyModule, + addDeclarationGroup, Info(..), ModuleInfo(..), InstanceDec, ParentName, diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs index 4e0ceb4eef..37ad1af7bf 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs @@ -532,7 +532,10 @@ Qualified names are also supported, like so: -} -{- | 'reify' looks up information about the 'Name'. +{- | 'reify' looks up information about the 'Name'. It will fail with +a compile error if the 'Name' is not visible. A 'Name' is visible if it is +imported or defined in a prior top-level declaration group. See the +documentation for 'newDeclarationGroup' for more details. It is sometimes useful to construct the argument name using 'lookupTypeName' or 'lookupValueName' to ensure that we are reifying from the right namespace. For instance, in this context: -- cgit v1.2.1