aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Common.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2015-10-30 17:26:01 +0100
committerDaniel Gröber <dxld@darkboxed.org>2015-10-30 17:26:01 +0100
commit4ffd00b5755da6a5c6f05f2f636d1900a35b83cd (patch)
treeeb2063de538dc5845c92c8515916298e3997af6a /CabalHelper/Common.hs
parent43f38dec80e082aaaee162817e3a5e8a96458632 (diff)
Fix warnings
Diffstat (limited to 'CabalHelper/Common.hs')
-rw-r--r--CabalHelper/Common.hs9
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