[Haskell] Sequencing of input and output, troubles in kdevelop

A.J. Bonnema abonnema at xs4all.nl
Fri Aug 27 06:24:14 EDT 2004


Hi,

I used kdevelop to enter and compile the following code (Haskell):

module Main where

main = do putStr "naam invoerbestand?"
	  inf <- getLine
	  txt <- readFile inf
	  putStr "naam uitvoerbestand?"
	  outf <- getLine
	  writeFile outf txt

When executed I have to enter the first filename, then the second 
filename and finally the questions are both asked in one go and the 
program ends.
This also happens if I executed the generated binary from an term.

However, using hugs, I get the first question first, enter the filename, 
then I get the second question, I enter the filename and then the 
program ends.

Why doesn't kdevelop generate code, that executes the statements in 
order? Or should I be looking at ghc? Or is it an option I am missing?

Guus.
-- 
A.J. Bonnema, Leiden The Netherlands,
user #328198 (Linux Counter http://counter.li.org)


More information about the Haskell mailing list