diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2021-11-05 00:47:32 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-12 21:22:03 -0500 |
commit | dfc4093ccb7c4b7402830ab7c715b55d90980af1 (patch) | |
tree | 7cd92eafd556c01b35d4298597f364dfbabbe25b /libraries/template-haskell/Language/Haskell/TH | |
parent | ca90ffa321a31842a32be1b5b6e26743cd677ec5 (diff) | |
download | haskell-dfc4093ccb7c4b7402830ab7c715b55d90980af1.tar.gz |
Implement -Wforall-identifier (#20609)
In accordance with GHC Proposal #281 "Visible forall in types of terms":
For three releases before this change takes place, include a new
warning -Wforall-identifier in -Wdefault. This warning will be triggered
at definition sites (but not use sites) of forall as an identifier.
Updates the haddock submodule.
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH')
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs index 7ed842ca94..9f19d75dcd 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs @@ -93,10 +93,10 @@ pprPatSynType :: PatSynType -> Doc pprPatSynType ty@(ForallT uniTys reqs ty'@(ForallT exTys provs ty'')) | null exTys, null provs = ppr (ForallT uniTys reqs ty'') | null uniTys, null reqs = noreqs <+> ppr ty' - | null reqs = forall uniTys <+> noreqs <+> ppr ty' + | null reqs = pprForallBndrs uniTys <+> noreqs <+> ppr ty' | otherwise = ppr ty - where noreqs = text "() =>" - forall tvs = text "forall" <+> (hsep (map ppr tvs)) <+> text "." + where noreqs = text "() =>" + pprForallBndrs tvs = text "forall" <+> hsep (map ppr tvs) <+> text "." pprPatSynType ty = ppr ty ------------------------------ |