From d8b722df890c9e1cc0bb9e631ae90578b4af6739 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 7 Feb 2009 18:45:21 +0000 Subject: [PATCH] Added a show instance for BackgroundKnowledge that helps when debugging --- checks/ArrayUsageCheck.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/checks/ArrayUsageCheck.hs b/checks/ArrayUsageCheck.hs index 8c19d18..93ee02f 100644 --- a/checks/ArrayUsageCheck.hs +++ b/checks/ArrayUsageCheck.hs @@ -361,6 +361,12 @@ data BackgroundKnowledge | LessThanOrEqual A.Expression A.Expression | RepBoundsIncl A.Variable A.Expression A.Expression +instance Show BackgroundKnowledge where + show (Equal e e') = showOccam e ++ " = " ++ showOccam e' + show (LessThanOrEqual e e') = showOccam e ++ " <= " ++ showOccam e' + show (RepBoundsIncl v e e') + = showOccam e ++ " <= " ++ showOccam v ++ " <= " ++ showOccam e' + -- | The names relate to the equations given in my Omega Test presentation. -- X is the top, Y is the bottom, A is the other var (x REM y = x + a) data ModuloCase =