diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2015-10-30 17:26:01 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2015-10-30 17:26:01 +0100 |
commit | 4ffd00b5755da6a5c6f05f2f636d1900a35b83cd (patch) | |
tree | eb2063de538dc5845c92c8515916298e3997af6a /CabalHelper | |
parent | 43f38dec80e082aaaee162817e3a5e8a96458632 (diff) |
Fix warnings
Diffstat (limited to 'CabalHelper')
-rw-r--r-- | CabalHelper/Common.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CabalHelper/Common.hs b/CabalHelper/Common.hs index 391a842..37c217a 100644 --- a/CabalHelper/Common.hs +++ b/CabalHelper/Common.hs @@ -96,10 +96,11 @@ takeExtension' p = then "" -- just ".cabal" is not a valid cabal file else takeExtension p -replace n r h = go "" n r h +replace :: String -> String -> String -> String +replace n r hs' = go "" hs' where - go acc n r h + go acc h | take (length n) h == n = reverse acc ++ r ++ drop (length n) h - go acc n r (h:hs) = go (h:acc) n r hs - go acc n r [] = reverse acc + go acc (h:hs) = go (h:acc) hs + go acc [] = reverse acc |