summaryrefslogtreecommitdiff
path: root/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
index 472a4f8557..d921a60e6b 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
@@ -468,6 +468,9 @@ infixRD prec nm = pure (InfixD (Fixity prec InfixR) nm)
infixND :: Quote m => Int -> Name -> m Dec
infixND prec nm = pure (InfixD (Fixity prec InfixN) nm)
+defaultD :: Quote m => [m Type] -> m Dec
+defaultD tys = DefaultD <$> sequenceA tys
+
pragInlD :: Quote m => Name -> Inline -> RuleMatch -> Phases -> m Dec
pragInlD name inline rm phases
= pure $ PragmaD $ InlineP name inline rm phases
@@ -1030,6 +1033,7 @@ withDecDoc doc dec = do
doc_loc (StandaloneDerivD _ _ _) = Nothing
doc_loc (DefaultSigD _ _) = Nothing
doc_loc (ImplicitParamBindD _ _) = Nothing
+ doc_loc (DefaultD _) = Nothing
-- | Variant of 'withDecDoc' that applies the same documentation to
-- multiple declarations. Useful for documenting quoted declarations.