mt wrote:
> hi,
> 
> i'd like to know how to write simply a line-based interactive program, that 
> is 
> one with which you have a 'talk'.

I would start with:

main =
   do putStrLn "Please enter text (or press return to exit):"
      s <- getLine
      if s /= "" then do
          putStrLn s
          main
        else return ()


> a simple filter-like line-based program ca be written as:
> 
> -- a filter program process an entire input to yield some output
> type FilterProgram = [Line] -> [Line]

Forget this, if it's not an (old) exercise

Christian
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to