From 1c5ad805d388181f065af67dd999e59966f4b855 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 16 Sep 2007 13:07:28 +0000 Subject: [PATCH] Simplified the buildExprPattern function in TestUtil --- common/TestUtil.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/TestUtil.hs b/common/TestUtil.hs index 174111d..e044ba7 100644 --- a/common/TestUtil.hs +++ b/common/TestUtil.hs @@ -357,13 +357,7 @@ data ExprHelper = | EHTrue buildExprPattern :: ExprHelper -> Pattern -buildExprPattern (Dy lhs op rhs) = tag4 A.Dyadic DontCare op (buildExprPattern lhs) (buildExprPattern rhs) -buildExprPattern (Mon op rhs) = tag3 A.Monadic DontCare op (buildExprPattern rhs) -buildExprPattern (Cast ty rhs) = tag4 A.Conversion DontCare A.DefaultConversion (stopCaringPattern m $ mkPattern ty) (buildExprPattern rhs) -buildExprPattern (Var n) = tag2 A.ExprVariable DontCare $ variablePattern n -buildExprPattern (DirVar dir n) = tag2 A.ExprVariable DontCare $ (stopCaringPattern m $ tag3 A.DirectedVariable DontCare dir $ variablePattern n) -buildExprPattern (Lit e) = (stopCaringPattern m) $ mkPattern e -buildExprPattern EHTrue = tag1 A.True DontCare +buildExprPattern = (stopCaringPattern m) . mkPattern . buildExpr buildExpr :: ExprHelper -> A.Expression buildExpr (Dy lhs op rhs) = A.Dyadic m op (buildExpr lhs) (buildExpr rhs)