Commit 1ec632f8 authored by Matthew Pickering's avatar Matthew Pickering Committed by Ben Gamari

Fix pretty printing of MINIMAL signatures

Reviewers: austin, alanz, bgamari

Reviewed By: alanz, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2836
parent 394231b3
...@@ -972,7 +972,8 @@ ppr_sig (InlineSig var inl) ...@@ -972,7 +972,8 @@ ppr_sig (InlineSig var inl)
<+> pprPrefixOcc (unLoc var)) <+> pprPrefixOcc (unLoc var))
ppr_sig (SpecInstSig src ty) ppr_sig (SpecInstSig src ty)
= pragSrcBrackets src "{-# SPECIALISE" (text "instance" <+> ppr ty) = pragSrcBrackets src "{-# SPECIALISE" (text "instance" <+> ppr ty)
ppr_sig (MinimalSig _ bf) = pragBrackets (pprMinimalSig bf) ppr_sig (MinimalSig src bf)
= pragSrcBrackets src "{-# MINIMAL" (pprMinimalSig bf)
ppr_sig (PatSynSig names sig_ty) ppr_sig (PatSynSig names sig_ty)
= text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty) = text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty)
ppr_sig (SCCFunSig src fn mlabel) ppr_sig (SCCFunSig src fn mlabel)
...@@ -1013,7 +1014,7 @@ instance Outputable TcSpecPrag where ...@@ -1013,7 +1014,7 @@ instance Outputable TcSpecPrag where
pprMinimalSig :: (OutputableBndr name) pprMinimalSig :: (OutputableBndr name)
=> LBooleanFormula (Located name) -> SDoc => LBooleanFormula (Located name) -> SDoc
pprMinimalSig (L _ bf) = text "MINIMAL" <+> ppr (fmap unLoc bf) pprMinimalSig (L _ bf) = ppr (fmap unLoc bf)
{- {-
************************************************************************ ************************************************************************
......
...@@ -35,3 +35,7 @@ class Foo a where ...@@ -35,3 +35,7 @@ class Foo a where
baz :: a -> a -> Bool baz :: a -> a -> Bool
quux :: a -> a -> Bool quux :: a -> a -> Bool
{-# MINIMAL bar, (foo, baq | foo, quux) #-} {-# MINIMAL bar, (foo, baq | foo, quux) #-}
class Foo2 a where
f :: a
{-# MiNiMaL f #-}
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