I have created a program that takes a in a string and 2 words. Every instance of the first word in the string is replaced by the 2nd word. But the problem i have is that if the 1st word entered is "i" and "i" is in "m'i'nt" it is replaced with the second word "m'choc'nt". Please Help me.

replace :: Eq a => [a] -> [a] -> [a] -> [a]
replace [] _ _ = []
replace s find repl =
if take (length find) s == find
then repl ++ (replace (drop (length find) s) find repl)
else [head s] ++ (replace (tail s) find repl)