better data types
This commit is contained in:
parent
e806152f77
commit
103dab702b
2 changed files with 33 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue