Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-18 Thread Daniel Fischer
Am Mittwoch, 18. Oktober 2006 09:35 schrieb Ketil Malde: > Daniel Fischer <[EMAIL PROTECTED]> writes: > > ghci-6.6 [prints the result of IO actions] by default > > I consider printing the value when it is used in an assignment a bug. > It makes it more difficult to test laziness issues or behavior

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-18 Thread Ketil Malde
Daniel Fischer <[EMAIL PROTECTED]> writes: > ghci-6.6 [prints the result of IO actions] by default I consider printing the value when it is used in an assignment a bug. It makes it more difficult to test laziness issues or behavior on e.g. large files. Anybody know why it was changed to the cur

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Daniel Fischer
Am Dienstag, 17. Oktober 2006 19:37 schrieb Víctor A. Rodríguez: > > What's wrong with doing it this way? > > > > -- ** UNTESTED CODE ** > > > > verifyAdd :: Int -> Int -> Int -> Bool > > verifyAdd a b sum | a + b == sum = True > > otherwise = False > > > > testAddMundane :: Int -> Int -> Bool > >

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Robert Dockins
On Oct 17, 2006, at 1:37 PM, Víctor A. Rodríguez wrote: What's wrong with doing it this way? -- ** UNTESTED CODE ** verifyAdd :: Int -> Int -> Int -> Bool verifyAdd a b sum | a + b == sum = True otherwise = False testAddMundane :: Int -> Int -> Bool testAddMundane a b = verifyAdd a b (a + b)

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Víctor A. Rodríguez
> What's wrong with doing it this way? > > -- ** UNTESTED CODE ** > > verifyAdd :: Int -> Int -> Int -> Bool > verifyAdd a b sum | a + b == sum = True > otherwise = False > > testAddMundane :: Int -> Int -> Bool > testAddMundane a b = verifyAdd a b (a + b) > > -- all the IO-dependent stuff is below

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Víctor A. Rodríguez
Hi, > What's wrong with doing it this way? > > -- ** UNTESTED CODE ** > > verifyAdd :: Int -> Int -> Int -> Bool > verifyAdd a b sum | a + b == sum = True > otherwise= False > > testAddMundane :: Int -> Int -> Bool > testAddMundane a b = verifyAdd a b (a + b) > > -- all the I

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Matthias Fischmann
On Tue, Oct 17, 2006 at 01:21:38PM -0300, V?ctor A. Rodr?guez wrote: > To: haskell-cafe@haskell.org > From: "Víctor A. Rodríguez" <[EMAIL PROTECTED]> > Date: Tue, 17 Oct 2006 13:21:38 -0300 > Subject: [Haskell-cafe] Newbie and working with IO Int and Int > >

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Robert Dockins
On Oct 17, 2006, at 12:21 PM, Víctor A. Rodríguez wrote: Hi all, I'm really newbie to Haskell, and working on a program I'm trying to make some testing. I make some test on certain know values ( e.g. adding 10 to 15 must return 25) and some test on random values (eg. adding rnd1 to rnd2 m

Re: [Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Seth Gordon
Víctor A. Rodríguez wrote: > Hi all, > > I'm really newbie to Haskell, and working on a program I'm trying to make > some testing. > I make some test on certain know values ( e.g. adding 10 to 15 must return > 25) and some test on random values (eg. adding rnd1 to rnd2 must return > rnd1+rnd2). >

[Haskell-cafe] Newbie and working with IO Int and Int

2006-10-17 Thread Víctor A. Rodríguez
Hi all, I'm really newbie to Haskell, and working on a program I'm trying to make some testing. I make some test on certain know values ( e.g. adding 10 to 15 must return 25) and some test on random values (eg. adding rnd1 to rnd2 must return rnd1+rnd2). The problem that makes me mad is the rando