From a838a8b08233629cbf54655f320257310504fd7f Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Wed, 5 May 2021 08:05:27 -0700 Subject: [PATCH] Rename `PrecNone` to more suggestive name `PrecCommas`; fix haddocks. --- saw-core/src/Verifier/SAW/Term/Pretty.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/saw-core/src/Verifier/SAW/Term/Pretty.hs b/saw-core/src/Verifier/SAW/Term/Pretty.hs index fd3407e47d..d28e96c98d 100644 --- a/saw-core/src/Verifier/SAW/Term/Pretty.hs +++ b/saw-core/src/Verifier/SAW/Term/Pretty.hs @@ -114,12 +114,12 @@ depthAllowed _ _ = True -- | Precedence levels, each of which corresponds to a parsing nonterminal data Prec - = PrecNone -- ^ Nonterminal 'Term' or "sepBy(Term, ',')" - | PrecTerm -- ^ Nonterminal 'Term' - | PrecLambda -- ^ Nonterminal 'LTerm' - | PrecProd -- ^ Nonterminal 'ProdTerm' - | PrecApp -- ^ Nonterminal 'AppTerm' - | PrecArg -- ^ Nonterminal 'AtomTerm' + = PrecCommas -- ^ Nonterminal @sepBy(Term, \',\')@ + | PrecTerm -- ^ Nonterminal @Term@ + | PrecLambda -- ^ Nonterminal @LTerm@ + | PrecProd -- ^ Nonterminal @ProdTerm@ + | PrecApp -- ^ Nonterminal @AppTerm@ + | PrecArg -- ^ Nonterminal @AtomTerm@ deriving (Eq, Ord) -- | Test if the first precedence "contains" the second, meaning that terms at @@ -337,7 +337,7 @@ ppLetBlock defs body = -- | Pretty-print pairs as "(x, y)" ppPair :: Prec -> SawDoc -> SawDoc -> SawDoc -ppPair prec x y = ppParensPrec prec PrecNone (group (vcat [x <> pretty ',', y])) +ppPair prec x y = ppParensPrec prec PrecCommas (group (vcat [x <> pretty ',', y])) -- | Pretty-print pair types as "x * y" ppPairType :: Prec -> SawDoc -> SawDoc -> SawDoc @@ -417,7 +417,7 @@ ppFlatTermF prec tf = Primitive ec -> annotate PrimitiveStyle <$> ppBestName (ecName ec) UnitValue -> return "(-empty-)" UnitType -> return "#(-empty-)" - PairValue x y -> ppPair prec <$> ppTerm' PrecTerm x <*> ppTerm' PrecNone y + PairValue x y -> ppPair prec <$> ppTerm' PrecTerm x <*> ppTerm' PrecCommas y PairType x y -> ppPairType prec <$> ppTerm' PrecApp x <*> ppTerm' PrecProd y PairLeft t -> ppProj "1" <$> ppTerm' PrecArg t PairRight t -> ppProj "2" <$> ppTerm' PrecArg t