simplify null Date2 queries too

This commit is contained in:
Simon Michael 2014-12-24 14:43:49 -08:00
parent 77c2c90290
commit 6780c63ab3

View File

@ -360,6 +360,7 @@ simplifyQuery q =
-- all queryIsDate qs = Date $ spansUnion $ mapMaybe queryTermDateSpan qs ? -- all queryIsDate qs = Date $ spansUnion $ mapMaybe queryTermDateSpan qs ?
| otherwise = Or $ map simplify $ filter (/=None) qs | otherwise = Or $ map simplify $ filter (/=None) qs
simplify (Date (DateSpan Nothing Nothing)) = Any simplify (Date (DateSpan Nothing Nothing)) = Any
simplify (Date2 (DateSpan Nothing Nothing)) = Any
simplify q = q simplify q = q
tests_simplifyQuery = [ tests_simplifyQuery = [