With Foo in the file c.out and the module
\begin{code}
module Main (main) where
import IO (openFile, hGetContents, hClose, IOMode(ReadMode))
import System (getArgs)
import Monad (when)
main :: IO ()
main = do [x] - getArgs
let you_want_it_to_work = read x
cout -
On Wed, Dec 18, 2002 at 02:51:48PM -, Simon Marlow wrote:
in fact, any prefix of Foo, including the empty string, would be
correct. See section 21.2.2 in the (revised) Haskell 98 report.
Aha, thanks. I've kludged around it with
last (' ':s) `seq` hClose cout
Ian