@@ -10,7 +10,7 @@ import Data.List (isPrefixOf)
1010
1111main = defaultMainWithHooks myHooks
1212
13−myHooks = defaultUserHooks { postConf = myPostConf, postClean = myPostClean }
13+myHooks = defaultUserHooks { postConf = myPostConf }
1414
1515pandocPath = combine "Text" "Pandoc"
1616
@@ -47,20 +47,6 @@ fillDefaultHeadersTemplate = do
4747 return . map (combine "headers") . filter (\x -> takeExtension x == ".header")
4848 fillTemplate files "DefaultHeaders.hs" "DefaultHeaders.hs"
4949
50−-- Post-clean: remove the files generated from templates.
51−myPostClean :: Args -> CleanFlags -> PackageDescription -> Maybe LocalBuildInfo -> IO ()
52−myPostClean _ _ _ _ = do
53− putStrLn "Removing source files generated from templates:"
54− removeGeneratedFile $ joinPath [pandocPath, "ASCIIMathML.hs"]
55− removeGeneratedFile $ joinPath [pandocPath, "DefaultHeaders.hs"]
56− removeGeneratedFile $ joinPath [pandocPath, "Writers", "S5.hs"]
57−
58−-- Remove file and print message.
59−removeGeneratedFile :: FilePath -> IO ()
60−removeGeneratedFile fpath = do
61− putStrLn $ " " ++ fpath
62− removeFile fpath
63−
6450-- Write the filled template file and print an explanatory message.
6551writeTemplate :: FilePath -> String -> IO ()
6652writeTemplate outfile contents = do