Re: An IO Question from a Newbie

2003-09-12 Thread Glynn Clements
Matt O'Connor wrote: > Hello all. I'm new to functional programming and Haskell, but have been > programming in C and Java for a while. I've been going through the tutorials > and whatnot on haskell.org. I've read from the Gentle Introduction to > Haskell about IO and some of the other stuf

Re: An IO Question from a Newbie

2003-09-12 Thread Derek Elkins
On Fri, 12 Sep 2003 16:27:59 -0600 Matt O'Connor <[EMAIL PROTECTED]> wrote: > Hello all. I'm new to functional programming and Haskell, but have > been programming in C and Java for a while. I've been going through > the tutorials and whatnot on haskell.org. I've read from the Gentle > Introduc

Re: An IO Question from a Newbie

2003-09-12 Thread Hal Daume III
This is a buffering problem. Use hSetBuffering to fix this (see Chapter 3 in YAHT -- www.isi.edu/~hdaume/htut/). Alternatively, use: > main = do putStrLn "Type Something:" > ... in which case the "Ln" part will force it to be printed. - Hal On Fri, 12 Sep 2003, Matt O'Connor wrot

Re: Simple IO Monad problem

2003-09-12 Thread Derek Elkins
On 12 Sep 2003 22:08:30 - [EMAIL PROTECTED] wrote: > Hello, > > I'm starting to use Haskell for writing actual programs using monads > and I'm already lost. > > I have the following script: > > #!/usr/bin/runhugs >

An IO Question from a Newbie

2003-09-12 Thread Matt O'Connor
Hello all. I'm new to functional programming and Haskell, but have been programming in C and Java for a while. I've been going through the tutorials and whatnot on haskell.org. I've read from the Gentle Introduction to Haskell about IO and some of the other stuff and I have a question about i

Re: Simple IO Monad problem

2003-09-12 Thread Nick Name
Alle 00:08, sabato 13 settembre 2003, [EMAIL PROTECTED] ha scritto: > ERROR "./mailalias.lhs":5 - Type error in final generator > *** Term           : map putStrLn strs > *** Type           : [IO ()] > *** Does not match : IO a > > Can someone please explain what I'm doing wrong? This is a type e

Simple IO Monad problem

2003-09-12 Thread kuq32tr02
Hello, I'm starting to use Haskell for writing actual programs using monads and I'm already lost. I have the following script: #!/usr/bin/runhugs > module Main where > import System(getArgs) > main = do putStr "Hel