summaryrefslogtreecommitdiff
path: root/Types/View.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types/View.hs')
-rw-r--r--Types/View.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Types/View.hs b/Types/View.hs
index ff2731593..2c30541fa 100644
--- a/Types/View.hs
+++ b/Types/View.hs
@@ -21,7 +21,16 @@ import Text.Regex.TDFA
#endif
{- A view is a list of fields with filters on their allowed values. -}
-type View = [(MetaField, ViewFilter)]
+type View = [ViewComponent]
+
+data ViewComponent = ViewComponent
+ { viewField :: MetaField
+ , viewFilter :: ViewFilter
+ }
+ deriving (Show, Eq)
+
+instance Arbitrary ViewComponent where
+ arbitrary = ViewComponent <$> arbitrary <*> arbitrary
{- Only files with metadata matching the view are displayed. -}
type FileView = FilePath