On 11/2/07, Petr Hoffmann [EMAIL PROTECTED] wrote:
import System.Cmd
main = do
System.Cmd.system echo hello output.txt -- use the external
application to create an output file
o1 - readFile output.txt
System.Cmd.system echo bye output.txt -- the second call to
On 11/2/07, Petr Hoffmann [EMAIL PROTECTED] wrote:
I'm solving the following problem - I need to use an external
application - give it the input data and receive its output.
Check out: The HSH library:
HSH is designed to let you mix and match shell expressions with
Haskell programs. With HSH,
On Fri, 2 Nov 2007, Petr Hoffmann wrote:
Hi,
I'm solving the following problem - I need to use an external
application - give it the input data and receive its output.
However, when multiple calls are made, the results are not
as expected. The simplified version of the problem is given
On 11/2/07, Petr Hoffmann [EMAIL PROTECTED] wrote:
import System.Cmd
main = do
System.Cmd.system echo hello output.txt -- use the external
application to create an output file
o1 - readFile output.txt
System.Cmd.system echo bye output.txt -- the second call to
Can you please give me some hint to solve this problem?
I'm a beginning haskell developer and I'm still a bit confused
by the IO monad.
Other people have explained to the OP why unsafe lazy IO is breaking his
code.
Yet another piece of evidence, in my opinion, that
unsafe-lazy-by-default is
Andrew Butterfield [EMAIL PROTECTED] writes:
I'm puzzled - when I run this on GHCi (v6.4, Windows XP) I get the
following outcome^^
The process cannot access the file because it is being used by another
process.
Isnt' this a difference between Windows and
Hello Petr,
Friday, November 2, 2007, 11:17:23 AM, you wrote:
o1 - readFile output.txt
add return $! length o1 here to evaluate whole list
System.Cmd.system echo bye output.txt -- the second call to
--
Best regards,
Bulatmailto:[EMAIL
Petr Hoffmann writes:
I'm solving the following problem - I need to use an external
application - give it the input data and receive its output.
However, when multiple calls are made, the results are not
as expected. The simplified version of the problem is given
below:
Hi,
I'm solving the following problem - I need to use an external
application - give it the input data and receive its output.
However, when multiple calls are made, the results are not
as expected. The simplified version of the problem is given
below:
import System.Cmd
main = do
On 11/2/07, Stuart Cook [EMAIL PROTECTED] wrote:
The solution would be to use a version of readFile that works in a
stricter way, by reading the file when it's told to, but I don't have
an implementation handy.
I guess this does the job:
readFile' fp = do
contents - readFile fp
let ret
On Fri, 2 Nov 2007, Felipe Lessa wrote:
On 11/2/07, Stuart Cook [EMAIL PROTECTED] wrote:
The solution would be to use a version of readFile that works in a
stricter way, by reading the file when it's told to, but I don't have
an implementation handy.
I guess this does the job:
On 11/2/07, Andrew Butterfield [EMAIL PROTECTED] wrote:
I'm puzzled - when I run this on GHCi (v6.4, Windows XP) I get the
following outcome
*Mainmain
The process cannot access the file because it is being used by another
process.
hello
*Main
Under GHCi 6.6 I get this:
*Main main
bye
lemming:
On Fri, 2 Nov 2007, Felipe Lessa wrote:
On 11/2/07, Stuart Cook [EMAIL PROTECTED] wrote:
The solution would be to use a version of readFile that works in a
stricter way, by reading the file when it's told to, but I don't have
an implementation handy.
I guess this does
13 matches
Mail list logo