diff --git a/src/Reopt/TypeInference/Solver/Constraints.hs b/src/Reopt/TypeInference/Solver/Constraints.hs index c2b384c8..c0e0d6de 100644 --- a/src/Reopt/TypeInference/Solver/Constraints.hs +++ b/src/Reopt/TypeInference/Solver/Constraints.hs @@ -37,14 +37,18 @@ prettySExp docs = PP.group $ PP.encloseSep "(" ")" " " docs -- output relatively compact. Use 'ppEqCWithProv' if you want to include -- 'eqProv'. instance PP.Pretty EqC where - pretty (EqC l r _prov) = prettySExp [PP.pretty l, "=", PP.pretty r] + pretty = ppEqCWithoutProv + -- pretty = ppEqCWithProv -- | Pretty-print an 'EqC', including its provenance. +ppEqCWithoutProv :: EqC -> PP.Doc ann +ppEqCWithoutProv (EqC l r _) = prettySExp [PP.pretty l, "=", PP.pretty r] + ppEqCWithProv :: EqC -> PP.Doc ann ppEqCWithProv eqC = PP.align $ PP.vsep - [ PP.pretty eqC + [ ppEqCWithoutProv eqC , PP.hang 2 $ "Provenance: " <> PP.pretty (eqProv eqC) ]