Since the original sed command took "Haskell" as standard input, why not:
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Text as T
import qualified Data.Text.IO as T
main :: IO ()
main = T.interact (T.replace "k" "sk" . T.replace "ke" "-ki")
Prelude takes a `String`, Data.Text.IO works with `Text`. Strings are linked lists of of chars, Text is a more traditional data structure. I tend to write small scripts and use Strings more, but Text is much more efficient for big blocks of text (unsurprisingly). The main reason I used it here was because I couldn't find a `replace` function for `String`, lol.
Whoops, it was a typo. I do know how to use the sed command, at least the basics; see my previous use of it ( https://news.ycombinator.com/item?id=42084984 ). But thanks, good catch.
HN "bros" (in the ugliest sense of the word "bro") showing their sick nature by viciously downvoting a perfectly innocuous comment.
Seems like many of them have nothing better to do, probably because of layoffs and statistics and linear algebra and 'predicting the next token' (hee hee) in the input, based on gigantic corpuses of data, masquerading as "AI", and many of those bros were/are worthless anyway.
Has-kill
$