From d9bc2092ab7bccb17ac5cb54343fefb95cfc5e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Wed, 6 May 2015 16:14:37 +0200 Subject: [PATCH] Remove dead code --- ghc-mod.cabal | 1 - src/Utils.hs | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 src/Utils.hs diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 5879f66..bc5a01c 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -175,7 +175,6 @@ Executable ghc-modi Main-Is: GHCModi.hs Other-Modules: Paths_ghc_mod Misc - Utils GHC-Options: -Wall -threaded -fno-warn-deprecations if os(windows) Cpp-Options: -DWINDOWS diff --git a/src/Utils.hs b/src/Utils.hs deleted file mode 100644 index c91151d..0000000 --- a/src/Utils.hs +++ /dev/null @@ -1,27 +0,0 @@ -module Utils where - --- | --- --- >>> split "foo bar baz" --- ["foo","bar baz"] --- >>> split "foo bar baz" --- ["foo","bar baz"] -split :: String -> [String] -split xs = [ys, dropWhile isSpace zs] - where - isSpace = (== ' ') - (ys,zs) = break isSpace xs - --- | --- --- >>> splitN 0 "foo bar baz" --- ["foo","bar baz"] --- >>> splitN 2 "foo bar baz" --- ["foo","bar baz"] --- >>> splitN 3 "foo bar baz" --- ["foo","bar","baz"] -splitN :: Int -> String -> [String] -splitN n xs - | n <= 2 = split xs - | otherwise = let [ys,zs] = split xs - in ys : splitN (n - 1) zs