"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Text/Pandoc/App/Opt.hs" between
pandoc-2.17.1.tar.gz and pandoc-2.17.1.1.tar.gz

About: Pandoc converts files from one markup format into another.

Opt.hs  (pandoc-2.17.1):Opt.hs  (pandoc-2.17.1.1)
skipping to change at line 708 skipping to change at line 708
$ T.pack $ Data.Yaml.prettyPrintParseException err' $ T.pack $ Data.Yaml.prettyPrintParseException err'
fullDefaultsPath :: (PandocMonad m, MonadIO m) fullDefaultsPath :: (PandocMonad m, MonadIO m)
=> Maybe FilePath => Maybe FilePath
-> FilePath -> FilePath
-> m FilePath -> m FilePath
fullDefaultsPath dataDir file = do fullDefaultsPath dataDir file = do
let fp = if null (takeExtension file) let fp = if null (takeExtension file)
then addExtension file "yaml" then addExtension file "yaml"
else file else file
let searchpath = fp : case dataDir of defaultDataDir <- liftIO defaultUserDataDir
Nothing -> [] let defaultFp = fromMaybe defaultDataDir dataDir </> "defaults" </> fp
Just d -> [d </> "defaults" </> fp] fromMaybe fp <$> findM fileExists [fp, defaultFp]
fromMaybe fp <$> findM fileExists searchpath
-- | In a list of lists, append another list in front of every list which -- | In a list of lists, append another list in front of every list which
-- starts with specific element. -- starts with specific element.
expand :: Ord a => [[a]] -> [a] -> a -> [[a]] expand :: Ord a => [[a]] -> [a] -> a -> [[a]]
expand [] ns n = fmap (\x -> x : [n]) ns expand [] ns n = fmap (\x -> x : [n]) ns
expand ps ns n = concatMap (ext n ns) ps expand ps ns n = concatMap (ext n ns) ps
where where
ext x xs p = case p of ext x xs p = case p of
(l : _) | x == l -> fmap (: p) xs (l : _) | x == l -> fmap (: p) xs
_ -> [p] _ -> [p]
 End of changes. 1 change blocks. 
4 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)