From 7462bad61546f1622a7b1e90f82ae33d42fc78e6 Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Fri, 3 May 2013 16:48:09 +0900 Subject: [PATCH] Update into exhaustive matches. --- relational-join/src/Database/Relational/Query/Product.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relational-join/src/Database/Relational/Query/Product.hs b/relational-join/src/Database/Relational/Query/Product.hs index 56b878be..cebe7f06 100644 --- a/relational-join/src/Database/Relational/Query/Product.hs +++ b/relational-join/src/Database/Relational/Query/Product.hs @@ -48,6 +48,7 @@ restrictProduct :: ProductTree q -> UExpr Bool -> ProductTree q restrictProduct = d where d (Join ja lp rp Nothing) rs' = Join ja lp rp (Just rs') d (Join ja lp rp (Just rs)) rs' = Join ja lp rp (Just $ rs `and` rs') + d leaf@(Leaf _ _) _ = leaf -- or error on compile newtype Product = Tree QueryProduct @@ -87,7 +88,7 @@ showQueryProduct = rec where showWordsSQL [joinType (joinAttr left') (joinAttr right'), JOIN], urec right', showWordSQL ON, - showString . showExpr . fromMaybe valueTrue $ rs] + showString . showExpr . fromMaybe valueTrue {- or error on compile -} $ rs] productSQL :: Product -> String productSQL = d where