Commit efe714d6 authored by Ryan Scott's avatar Ryan Scott

Parenthesize GADT return types in pprIfaceConDecl (#17384)

We were using `pprIfaceAppArgs` instead of `pprParendIfaceAppArgs`
in `pprIfaceConDecl`. Oops.

Fixes #17384.
parent 9ecf4bb1
......@@ -1114,7 +1114,7 @@ pprIfaceConDecl ss gadt_style tycon tc_binders parent
-- [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep.)
ppr_tc_app gadt_subst =
pprPrefixIfDeclBndr how_much (occName tycon)
<+> pprIfaceAppArgs
<+> pprParendIfaceAppArgs
(substIfaceAppArgs gadt_subst (mk_tc_app_args tc_binders))
mk_tc_app_args :: [IfaceTyConBinder] -> IfaceAppArgs
......
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module T17384 where
import Data.Kind
data T :: Type -> Type where
MkT :: T (Maybe Bool)
type role T nominal
data T a where
MkT :: T (Maybe Bool)
-- Defined at T17384.hs:7:1
......@@ -299,3 +299,4 @@ test('T16509', normal, ghci_script, ['T16509.script'])
test('T16527', normal, ghci_script, ['T16527.script'])
test('T16563', extra_hc_opts("-clear-package-db -global-package-db"), ghci_script, ['T16563.script'])
test('T16767', normal, ghci_script, ['T16767.script'])
test('T17384', normal, ghci_script, ['T17384.script'])
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