We can use the replace :: Text -> Text -> Text -> Text function of the Data.Text function. For example:
Prelude Data.Text> replace "//" ".." "not really//"
"not really.."
Here we work however on Texts. If that is a problem, we can also use pack :: String -> Text and unpack :: Text -> String to convert between String and Text. So we can define a function with:
{-# LANGUAGE OverloadedStrings #-}
import Data.Text(pack, unpack, replace)
replacedoubleslash :: String -> String
replacedoubleslash = unpack . replace "//" ".." . pack
But usually for efficient string processing - both in terms of speed and memory - using Text is better than working with Strings.