import Data.Char import Control.Applicative import System.Environment import Control.Monad analyseLine :: String -> [String] analyseLine = map pure . filter (not . isAscii) main :: IO () main = do args <- getArgs when (not . null $ args) $ putStrLn "Reading from stdin" putStrLn =<< unlines . concatMap analyseLine . lines <$> getContents