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