simplify type
This commit is contained in:
		
					parent
					
						
							
								c54792e367
							
						
					
				
			
			
				commit
				
					
						81628d24c8
					
				
			
		
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -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 |  - Note that a file may appear multiple times in a view, when it | ||||||
|  - has multiple matching values for a MetaField used in the View. |  - 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 | fileViews view mkfileview file metadata | ||||||
| 	| any isNothing matches = Nothing | 	| any isNothing matches = [] | ||||||
| 	| otherwise = Just $ map (</> mkfileview file) $ | 	| otherwise = map (</> mkfileview file) $ | ||||||
| 		pathProduct $ map (map fromMetaValue) $ visible matches | 		pathProduct $ map (map fromMetaValue) $ visible matches | ||||||
|   where |   where | ||||||
|   	matches :: [Maybe [MetaValue]] |   	matches :: [Maybe [MetaValue]] | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joey Hess
				Joey Hess