{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding (putStrLn)
import Data.Text (Text, replace)
import Data.Text.IO (putStrLn)
transform :: Text -> Text
transform = replace "k" "sk" . replace "ke" "-ki"
main :: IO ()
main = putStrLn $ transform "Haskell"
Looks good to me, even as a Haskell ignoramus. I had tried it long back, but found it tough at the time.
What is the reason for hiding the putStrLn of Prelude and importing that of Data.Text.IO?
Since the original sed command took "Haskell" as standard input, why not: