Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve the printing of CvarPs

  • Loading branch information...
commit 2a10d5e1f8f40d387e40fc9aa2c04161a61aef4b 1 parent 25a9be8
@yav authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Data/Integer/Presburger/Prop.hs
View
6 src/Data/Integer/Presburger/Prop.hs
@@ -165,8 +165,12 @@ instance SignPP CVarP where
NBin op t -> it <+> pp_neg n op <+> pp t
NDivides d t -> text (show d) <+> pp_neg_div n
<+> it <+> text "+" <+> pp t
- where it = text (show (coeff p)) <+> text "* _"
+ where it | c == 1 = text "_"
+ | c == (-1) = text "- _"
+ | otherwise = text (show c) <+> text "* _"
+ c = coeff p
+
instance SignPP p => PP (Prop p) where
pp p = pp_neg (negated p) (prop p)
Please sign in to comment.
Something went wrong with that request. Please try again.