[Haskell-cafe] Re: Returning a list element?

2006-03-22 Thread Dominic Steinitz
Donald Bruce Stewart dons at cse.unsw.edu.au writes: mainMenu = sequence_ $ map putStrLn [line1, line2, line3] I argue if you want to sequence_ a map you should write mapM_: mapM_ putStrLn [line1, line2, line3] Nice mapM is under-appreciated? More under-appreciated are line

Re: [Haskell-cafe] Porting GHC to OSX86?

2006-03-22 Thread Thomas Davie
On Mar 21, 2006, at 8:09 PM, Deling Ren wrote: Hi there, Has anyone made any attempt to port GHC to Mac OS X on x86? Wolfgang Thaller’s binary package runs over Rosetta but slow (not surprising). It can not be used to compile a native version either (I got some errors related to machine

[Haskell-cafe] Re: strange ghc program behaviour

2006-03-22 Thread Koen . Roelandt
From ghc-6.4, the runtime system no longer flushes open files; it truncates them instead. You should close (or flush) the file explicitly with 'hClose' or 'hFlush' before the program terminates. I added 'hClose' to processXmlWith in the Wrapper module. That solved the problem. Thank you!

Re: [Haskell-cafe] Porting GHC to OSX86?

2006-03-22 Thread Deling Ren
It's not supported on i386 platform yet :( On Mar 22, 2006, at 12:34 AM, Thomas Davie wrote: On Mar 21, 2006, at 8:09 PM, Deling Ren wrote: Hi there, Has anyone made any attempt to port GHC to Mac OS X on x86? Wolfgang Thaller’s binary package runs over Rosetta but slow (not

[Haskell-cafe] Re: Reading files efficiently

2006-03-22 Thread Simon Marlow
Donald Bruce Stewart wrote: Well, I know this works: $ cat A.lhs #!/usr/bin/env runhaskell main = putStrLn gotcha! $ ./A.lhs gotcha! But for files with no .hs or .lhs extension? Anyone know of a trick? GHC 6.6 will allow this, because we added the -x flag (works just

Re: [Haskell-cafe] Porting GHC to OSX86?

2006-03-22 Thread Gregory Wright
Hi, DP will support the i386 build as soon as Wolfgang makes his changes available. As I understand, from earlier messages on one of the ghc* lists, this is almost done for the pre-6.6 branch, but not yet backported to the 6.4.x branch. Also, DP uses a binary bootstrap compiler to build ghc,

[Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-22 Thread Isaac Jones
I think someone should volunteer to set up Planet Haskell ala Planet Debian, Planet Gnome, Planet Perl, etc. These sites are Blog aggregators. Basically they just collect the RSS feeds of the community and post their blogs to a web page in a cute format (the gnome one is especially cute, but you

[Haskell-cafe] Wheres this going wrong

2006-03-22 Thread Neil Rutland
Hi there, Thanks to some advise by one of the other posters i have chosen to try and set up a list that uses lookup to find the values of the elements within it. However what i have attempted so far has resulted in odd answers or errors. Anyway here it is, i have given each element a string at

Re: [Haskell-cafe] Wheres this going wrong

2006-03-22 Thread Sebastian Sylvan
On 3/22/06, Neil Rutland [EMAIL PROTECTED] wrote: Hi there, Thanks to some advise by one of the other posters i have chosen to try and set up a list that uses lookup to find the values of the elements within it. However what i have attempted so far has resulted in odd answers or errors.

Re: [Haskell-cafe] Wheres this going wrong

2006-03-22 Thread Udo Stenzel
Neil Rutland wrote: ttyyppee LLiinnee == [[((((SSttrriinngg,,SSttrriinngg)),,((SSttrriinngg,,IInntt)),,((SSttrriinngg,,IInntt)),,((SSttrriinngg,,BBooooll)),,

[Haskell-cafe] Code Review: Sudoku solver

2006-03-22 Thread David F. Place
Hi All, I really appreciate all the help I received when I asked you to critique my PrefixMap module a few weeks ago. I think I am making good progress in correcting the lisp in my Haskell programming. I'll be very grateful to anyone who can take a glance at the attached short program

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-03-22 Thread Jared Updike
On 3/22/06, David F. Place [EMAIL PROTECTED] wrote: Hi All, I really appreciate all the help I received when I asked you to critique my PrefixMap module a few weeks ago. I think I am making good progress in correcting the lisp in my Haskell programming. I'll be very grateful to anyone who

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-03-22 Thread Robert Dockins
On Mar 22, 2006, at 2:16 PM, David F. Place wrote: Hi All, I really appreciate all the help I received when I asked you to critique my PrefixMap module a few weeks ago. I think I am making good progress in correcting the lisp in my Haskell programming. I'll be very grateful to anyone

[Haskell-cafe] Bit streams programs in Haskell

2006-03-22 Thread Per Gustafsson
Haskell gurus, We have made a proposal to extend the Erlang `binary' data type from being a sequence of bytes (a byte stream) to being a sequence of bits (a bitstream) with the ability to do pattern matching at the bit level. This proposal has now been fully implemented all these at the level

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-03-22 Thread Chris Kuklewicz
Robert Dockins wrote: On Mar 22, 2006, at 2:16 PM, David F. Place wrote: Hi All, I really appreciate all the help I received when I asked you to critique my PrefixMap module a few weeks ago. I think I am making good progress in correcting the lisp in my Haskell programming. The style

Re: [Haskell-cafe] Bit streams programs in Haskell

2006-03-22 Thread David F. Place
One thing I noticed, is that you are measuring IO in the Haskell version of drop3. hGetContents is lazy. On Mar 22, 2006, at 4:43 PM, Per Gustafsson wrote: Also, perhaps our mind might be suffering from severe case of strictness and might be completely unable to `think lazily'. So, we

Re: [Haskell-cafe] Bit streams programs in Haskell

2006-03-22 Thread Chris Kuklewicz
Per Gustafsson wrote: Haskell gurus, I am not a guru, but I'll clean up some of this. Our experience in writing efficient (and beautiful) Haskell programs is close to (if not below) zero. Also, perhaps our mind might be suffering from severe case of strictness and might be completely

Re: [Haskell-cafe] Bit streams programs in Haskell

2006-03-22 Thread Donald Bruce Stewart
per.gustafsson: Haskell gurus, We have made a proposal to extend the Erlang `binary' data type from being a sequence of bytes (a byte stream) to being a sequence of bits (a bitstream) with the ability to do pattern matching at the bit level. Our experience in writing efficient (and