--  Copy the input to the output (like 'cat' does).

{-
   The file name should generally be the same as the module name.
   But these short modules are not used as a library elsewhere,
   so the file name does not matter.
-}


{-
    $ ghc -Wall main1.hs
    $ ./main1 < main1.hs
 -}

module Main where

{-
   interact :: (String -> String) -> IO () ; the input and output are strings
   id       :: a -> a                      ; polymorphic identity function
 -}

main :: IO()
main = interact id

--  ------------For GNU Emacs ------------
--  Local Variables:
--  compile-command: "ghc -Wall main1.hs"
--  End: