diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2016-07-01 01:15:01 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-07-01 14:12:37 +0200 |
commit | b412d8230b20223beff797d6207868aea9fd2085 (patch) | |
tree | e04b5e55debdeba41e0b641b74763d278a331bc1 /compiler/hsSyn/HsBinds.hs | |
parent | 81b437bcc680745d5d50d731b978a1764f40ab36 (diff) | |
download | haskell-b412d8230b20223beff797d6207868aea9fd2085.tar.gz |
Allow one type signature for multiple pattern synonyms
This makes pattern synonym signatures more consistent with normal
type signatures.
Updates haddock submodule.
Differential Revision: https://phabricator.haskell.org/D2083
Diffstat (limited to 'compiler/hsSyn/HsBinds.hs')
-rw-r--r-- | compiler/hsSyn/HsBinds.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs index 5383ee5c6b..8772619e85 100644 --- a/compiler/hsSyn/HsBinds.hs +++ b/compiler/hsSyn/HsBinds.hs @@ -705,7 +705,7 @@ data Sig name -- 'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow' -- For details on above see note [Api annotations] in ApiAnnotation - | PatSynSig (Located name) (LHsSigType name) + | PatSynSig [Located name] (LHsSigType name) -- P :: forall a b. Req => Prov => ty -- | A signature for a class method @@ -901,9 +901,8 @@ ppr_sig (InlineSig var inl) = pragBrackets (ppr inl <+> pprPrefixOcc (unLo ppr_sig (SpecInstSig _ ty) = pragBrackets (text "SPECIALIZE instance" <+> ppr ty) ppr_sig (MinimalSig _ bf) = pragBrackets (pprMinimalSig bf) -ppr_sig (PatSynSig name sig_ty) - = text "pattern" <+> pprPrefixOcc (unLoc name) <+> dcolon - <+> ppr sig_ty +ppr_sig (PatSynSig names sig_ty) + = text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty) instance OutputableBndr name => Outputable (FixitySig name) where ppr (FixitySig names fixity) = sep [ppr fixity, pprops] |