@@ -18,13 +18,13 @@ import Prelude
18import Data.Char (toLower)
18import Data.Char (toLower)
19import System.FilePath (takeExtension)
19import System.FilePath (takeExtension)
21−-- Determine default reader based on source file extensions.
21+-- Determine default format based on file extensions.
22−formatFromFilePaths :: String -> [FilePath] -> String
22+formatFromFilePaths :: [FilePath] -> Maybe String
23−formatFromFilePaths fallback [] = fallback
23+formatFromFilePaths [] = Nothing
24−formatFromFilePaths fallback (x:xs) =
24+formatFromFilePaths (x:xs) =
25 case formatFromFilePath x of
25 case formatFromFilePath x of
26− Just f -> f
26+ Just f -> Just f
27− Nothing -> formatFromFilePaths fallback xs
27+ Nothing -> formatFromFilePaths xs
29-- Determine format based on file extension
29-- Determine format based on file extension
30formatFromFilePath :: FilePath -> Maybe String
30formatFromFilePath :: FilePath -> Maybe String