Remove dead code
This commit is contained in:
parent
0f1e653f7f
commit
d9bc2092ab
@ -175,7 +175,6 @@ Executable ghc-modi
|
|||||||
Main-Is: GHCModi.hs
|
Main-Is: GHCModi.hs
|
||||||
Other-Modules: Paths_ghc_mod
|
Other-Modules: Paths_ghc_mod
|
||||||
Misc
|
Misc
|
||||||
Utils
|
|
||||||
GHC-Options: -Wall -threaded -fno-warn-deprecations
|
GHC-Options: -Wall -threaded -fno-warn-deprecations
|
||||||
if os(windows)
|
if os(windows)
|
||||||
Cpp-Options: -DWINDOWS
|
Cpp-Options: -DWINDOWS
|
||||||
|
27
src/Utils.hs
27
src/Utils.hs
@ -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
|
|
Loading…
Reference in New Issue
Block a user