module Variables ( htmlXmlns , catHakefile , catFile ) where import Text.RegexPR (gsubRegexPR) htmlXmlns :: String htmlXmlns = "http://www.w3.org/1999/xhtml" catHakefile :: String -> IO String catHakefile dir = do cont_ <- readFile $ "../samples/" ++ dir ++ "/Hakefile" let cont = flip (foldr (uncurry gsubRegexPR)) [ (">", ">"), ("<", "<") ] cont_ return $ "
> cat Hakefile
\n" ++ "" ++ cont ++ "
"
catFile :: String -> String -> IO String
catFile fn dir = do
cont_ <- readFile $ "../samples/" ++ dir ++ "/" ++ fn
let cont = flip (foldr (uncurry gsubRegexPR)) [ (">", ">"), ("<", "<") ] cont_
return $ "> cat " ++ fn ++ "
\n" ++ "" ++ cont ++ "
"