Re: [Haskell-cafe] IO platform for testing

2005-07-16 Thread Isaac Jones
yin <[EMAIL PROTECTED]> writes: > first I have to apologise for my English. Don't worry about that. > ./bundle01... > > I more apoarches, but no one worked. Now I tried this: > >m01_mod :: Int -> Int -> Int What's m01? You define b01 below: >b01_mod a b = a mod b You must type

[Haskell-cafe] Re: Lists vs. Monads

2005-07-16 Thread oleg
Jonathan Cast wrote: > > If you had a version of Haskell without recursive data types you > > wouldn't be at a loss, because you could always use monads to recreate > > lists. Maybe "bind" would replace the job of "cons" and "return" > > would replace "head" or somesuch. > No. You

[Haskell-cafe] flushing trace debug output before getting other output

2005-07-16 Thread Terrence Brannon
I'm working on exercise 6.16 in Thompson's "Haskell; the Craft of Functional Programming" My goal for the moment is to call printPicture to see my results: type Picture = [[Char]] printPicture :: Picture -> IO () printPicture = putStr . concat . map (++"\n") And everything is encouraging. The r

Unicode in GHC 6.2.2 and 6.4.x (was: Re: [Haskell-cafe] Unicode.hs)

2005-07-16 Thread Dimitry Golubovsky
Dear List Subscribers, Simon Marlow wrote: On 30 June 2005 14:36, Dimitry Golubovsky wrote: It is in CVS now, and I believe will be in 6.4.1 Not planned for 6.4.1, but definitely in 6.6. I have put those files that work for me in GHC 6.2.2 (Unicode support) for download. Please read th

Re: [Haskell-cafe] Lists vs. Monads

2005-07-16 Thread Jonathan Cast
Greg Buchholz <[EMAIL PROTECTED]> wrote: > Here's a question for the Haskell community that I've been > wrestling with lately. When we say "lists are monads" what does that > mean? I can see one of two things. First the slightly superficial... > > A.) Lists can be made members

[Haskell-cafe] O'Haskell

2005-07-16 Thread Monique Louise
Is there any project for extending GHC or any other Haskell compiler with support to O'Haskell / any object-oriented Haskell extesion? That could be very useful for improving Haskell interoperability with OO languages. Thanks in advance, Monique Monteiro -- Moniq

Re: [Haskell-cafe] IO platform for testing

2005-07-16 Thread Scott Turner
On 2005 July 16 Saturday 11:19, yin wrote: > I need some testing 'main' function: > > ./bundle01... Your code is close to working. Most likely the detail which gave you trouble is the syntax for mod. It should be >b01_mod a b = a `mod` b Infix operator names in Haskell all use backquotes.

[Haskell-cafe] IO platform for testing

2005-07-16 Thread yin
Hello all, first I have to apologise for my English. So, I don't fully understand haskells IO, but I need some testing 'main' function: ./bundle01... I more apoarches, but no one worked. Now I tried this: m01_mod :: Int -> Int -> Int b01_mod a b = a mod b main = do (cm

Re: [Haskell-cafe] weired

2005-07-16 Thread Einar Karttunen
wenduan <[EMAIL PROTECTED]> writes: > The following function which converts a number represents a sum of money > in pence didn't work as expected and the result didn't make any sense to me: > > penceToString :: Price -> String > penceToString p = > let str = show p >len = length s

[Haskell-cafe] weird

2005-07-16 Thread wenduan
The following function which converts a number represents a sum of money in pence didn't work as expected and the result didn't make any sense to me: penceToString :: Price -> String penceToString p = let str = show p len = length str in if len ==1 then "0.0" ++ str else

[Haskell-cafe] weired

2005-07-16 Thread wenduan
The following function which converts a number represents a sum of money in pence didn't work as expected and the result didn't make any sense to me: penceToString :: Price -> String penceToString p = let str = show p len = length str in if len ==1 then "0.0" ++ str else