mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2025-01-07 13:46:41 +03:00
Update into exhaustive matches.
This commit is contained in:
parent
0eae444f96
commit
7462bad615
@ -48,6 +48,7 @@ restrictProduct :: ProductTree q -> UExpr Bool -> ProductTree q
|
|||||||
restrictProduct = d where
|
restrictProduct = d where
|
||||||
d (Join ja lp rp Nothing) rs' = Join ja lp rp (Just rs')
|
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 (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
|
newtype Product = Tree QueryProduct
|
||||||
@ -87,7 +88,7 @@ showQueryProduct = rec where
|
|||||||
showWordsSQL [joinType (joinAttr left') (joinAttr right'), JOIN],
|
showWordsSQL [joinType (joinAttr left') (joinAttr right'), JOIN],
|
||||||
urec right',
|
urec right',
|
||||||
showWordSQL ON,
|
showWordSQL ON,
|
||||||
showString . showExpr . fromMaybe valueTrue $ rs]
|
showString . showExpr . fromMaybe valueTrue {- or error on compile -} $ rs]
|
||||||
|
|
||||||
productSQL :: Product -> String
|
productSQL :: Product -> String
|
||||||
productSQL = d where
|
productSQL = d where
|
||||||
|
Loading…
Reference in New Issue
Block a user