vadd: Allow listing multiple desired values for a field.

This commit is contained in:
Joey Hess 2014-03-02 15:36:45 -04:00
parent c2e8c21ca6
commit 7d9486a709
5 changed files with 36 additions and 28 deletions

View file

@ -50,6 +50,9 @@ instance Arbitrary ViewFilter where
, return (ExcludeValues s)
)
mkViewComponent :: MetaField -> ViewFilter -> ViewComponent
mkViewComponent f vf = ViewComponent f vf (multiValue vf)
{- Can a ViewFilter match multiple different MetaValues? -}
multiValue :: ViewFilter -> Bool
multiValue (FilterValues s) = S.size s > 1