From ef39cced4a34a9ab666477befe04a88042ee99b5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 16 May 2009 21:19:38 +0000 Subject: [PATCH] don't fail when matching an empty pattern, as in "not:" --- Ledger/AccountName.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ledger/AccountName.hs b/Ledger/AccountName.hs index 6453338c0..33a3a6627 100644 --- a/Ledger/AccountName.hs +++ b/Ledger/AccountName.hs @@ -145,4 +145,4 @@ isnegativepat pat = negateprefix `isPrefixOf` pat abspat pat = if isnegativepat pat then drop (length negateprefix) pat else pat positivepats = filter (not . isnegativepat) negativepats = filter isnegativepat -matchregex pat str = containsRegex (mkRegexWithOpts pat True False) str +matchregex pat str = null pat || containsRegex (mkRegexWithOpts pat True False) str