Added a show instance for BackgroundKnowledge that helps when debugging

This commit is contained in:
Neil Brown 2009-02-07 18:45:21 +00:00
parent 6d8c195c22
commit d8b722df89

View File

@ -361,6 +361,12 @@ data BackgroundKnowledge
| LessThanOrEqual A.Expression A.Expression | LessThanOrEqual A.Expression A.Expression
| RepBoundsIncl A.Variable 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. -- | 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) -- X is the top, Y is the bottom, A is the other var (x REM y = x + a)
data ModuloCase = data ModuloCase =