From 45d034f137fbc225b0e9d0a633a51856490b2932 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Wed, 27 Jan 2016 22:30:18 +0100 Subject: [PATCH] Remove convert script --- doc/tutorial/convert.hs | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 doc/tutorial/convert.hs diff --git a/doc/tutorial/convert.hs b/doc/tutorial/convert.hs deleted file mode 100644 index ffcb60a7..00000000 --- a/doc/tutorial/convert.hs +++ /dev/null @@ -1,30 +0,0 @@ - -import Control.Arrow -import Data.Foldable -import Data.List -import System.Environment - -main = do - files <- getArgs - forM_ files $ \ file -> do - convertM file - -convertM :: FilePath -> IO () -convertM file = do - contents <- readFile file - seq (length contents) (return ()) - writeFile file (convert contents) - -convert :: String -> String -convert = - lines >>> - groupBy (\ a b -> take 1 a == take 1 b) >>> - map go >>> - concat >>> - unlines - where - go :: [String] -> [String] - go (a : r) - | ">" `isPrefixOf` a - = "``` haskell ignore" : map (drop 2) (a : r) ++ "```" : [] - go x = x