diff --git a/src/Constrained/Spec/Set.hs b/src/Constrained/Spec/Set.hs index c81e0b5..28dfc84 100644 --- a/src/Constrained/Spec/Set.hs +++ b/src/Constrained/Spec/Set.hs @@ -251,13 +251,13 @@ instance Semantics SetW where semantics = setSem instance Syntax SetW where - prettySymbol SubsetW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "subset_" <+> prettyShowSet n <+> prettyPrec 10 y - prettySymbol SubsetW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "subset_" <+> prettyPrec 10 y <+> prettyShowSet n - prettySymbol DisjointW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "disjoint_" <+> prettyShowSet n <+> prettyPrec 10 y - prettySymbol DisjointW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "disjoint_" <+> prettyPrec 10 y <+> prettyShowSet n - prettySymbol UnionW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "union_" <+> prettyShowSet n <+> prettyPrec 10 y - prettySymbol UnionW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "union_" <+> prettyPrec 10 y <+> prettyShowSet n - prettySymbol MemberW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "member_" <+> prettyPrec 10 y <+> prettyShowSet n + prettySymbol SubsetW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "subset_" <+> prettyShowSet n <+> prettyPrec 11 y + prettySymbol SubsetW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "subset_" <+> prettyPrec 11 y <+> prettyShowSet n + prettySymbol DisjointW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "disjoint_" <+> prettyShowSet n <+> prettyPrec 11 y + prettySymbol DisjointW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "disjoint_" <+> prettyPrec 11 y <+> prettyShowSet n + prettySymbol UnionW (Lit n :> y :> Nil) p = Just $ parensIf (p > 10) $ "union_" <+> prettyShowSet n <+> prettyPrec 11 y + prettySymbol UnionW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "union_" <+> prettyPrec 11 y <+> prettyShowSet n + prettySymbol MemberW (y :> Lit n :> Nil) p = Just $ parensIf (p > 10) $ "member_" <+> prettyPrec 11 y <+> prettyShowSet n prettySymbol _ _ _ = Nothing instance (Ord a, HasSpec a, HasSpec (Set a)) => Semigroup (Term (Set a)) where diff --git a/src/Constrained/TheKnot.hs b/src/Constrained/TheKnot.hs index f71fcc7..7da9c90 100644 --- a/src/Constrained/TheKnot.hs +++ b/src/Constrained/TheKnot.hs @@ -206,7 +206,7 @@ instance Syntax ProdW where prettySelect :: Int -> TermD deps t -> Maybe (Doc ann) prettySelect i (App f (t :> Nil)) | Just ProdSndW <- getWitness f = prettySelect (i + 1) t - | Just ToGenericW <- getWitness f = Just $ "sel @" <> pretty i <+> pretty t + | Just ToGenericW <- getWitness f = Just $ "sel @" <> pretty i <+> prettyPrec 11 t prettySelect _ _ = Nothing instance Semantics ProdW where