aboutsummaryrefslogtreecommitdiff
path: root/Annex/View.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-16 17:46:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-16 17:46:52 -0400
commitdd5933f2125c3167990a72a82b9280c4a87ede3e (patch)
tree9ded1fc8374bdde90fdaa94adcaeda49e60504b4 /Annex/View.hs
parente37547e32f09bcc28e0d7fa5e31415439e1fd2f8 (diff)
simplify type
Diffstat (limited to 'Annex/View.hs')
-rw-r--r--Annex/View.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Annex/View.hs b/Annex/View.hs
index 620e71f0e..3ac22a6d8 100644
--- a/Annex/View.hs
+++ b/Annex/View.hs
@@ -99,11 +99,14 @@ fileViewFromReference f = base ++ concatMap (\d -> "(" ++ d ++ ")") dirs ++ conc
-
- Note that a file may appear multiple times in a view, when it
- has multiple matching values for a MetaField used in the View.
+ -
+ - Of course if its MetaData does not match the View, it won't appear at
+ - all.
-}
-fileViews :: View -> MkFileView -> FilePath -> MetaData -> Maybe [FileView]
+fileViews :: View -> MkFileView -> FilePath -> MetaData -> [FileView]
fileViews view mkfileview file metadata
- | any isNothing matches = Nothing
- | otherwise = Just $ map (</> mkfileview file) $
+ | any isNothing matches = []
+ | otherwise = map (</> mkfileview file) $
pathProduct $ map (map fromMetaValue) $ visible matches
where
matches :: [Maybe [MetaValue]]