Re: [Haskell-cafe] Re: Shouldn't this loop indefinitely => take (last [0..]) [0..]

2008-04-05 Thread David Menendez
On Fri, Apr 4, 2008 at 5:45 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > ndmitchell: > > Note: In case anyone gets the wrong impression, I am not suggesting > > lazy naturals be the standard numeric type in Haskell, just that by > > not going that way we have paid a cost in terms of elegance. >

Re: [Haskell-cafe] Beginners arrow question

2008-04-05 Thread Luke Palmer
On Sat, Apr 5, 2008 at 4:00 PM, Cale Gibbard <[EMAIL PROTECTED]> wrote: > GHC has a special syntax for using ArrowApply (which HXT is an > instance of). Whenever the expression to the left of -< needs to > involve a local variable, you can replace -< with -<< and it should > work. To understand

Re: [Haskell-cafe] Beginners arrow question

2008-04-05 Thread Cale Gibbard
On 05/04/2008, Paul Johnson <[EMAIL PROTECTED]> wrote: > myProblem :: (ArrowXml a) -> a XmlTree String > myProblem = proc xml do > name <- getAttrValue "name" -< xml > fmt <- arr lookupFormatter -< name > fmt -< xml > GHC has a special syntax for using ArrowApply (which HXT is an instance

[Haskell-cafe] Problems installing OpenAL / compiling an OpenAL program

2008-04-05 Thread Henk-Jan van Tuyl
L.S., I downloaded OpenAL from Hackage and tried to compile a program that uses it (on a Windows XP computer). I got a long list of messages in the linking phase; I found a related ticket, http://hackage.haskell.org/trac/ghc/ticket/1140 with a patch. I applied the patch manually and remov

[Haskell-cafe] lhs2TeX --> html?

2008-04-05 Thread Conal Elliott
Has anyone fiddled with hooking up lhs2TeX a tex->html tool like jsMath, for lovely code in a web page? - Conal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Beginners arrow question

2008-04-05 Thread Claude Heiland-Allen
Paul Johnson wrote: I'm using arrows for the first time, with HXT. I think I'm getting the hang of it, but one problem has me stumped. I have a function "lookupFormatter" which takes a string and returns an arrow, and I want to use that arrow. Something like this: myProblem :: (ArrowXml a)

Re: [Haskell-cafe] Beginners arrow question

2008-04-05 Thread Miguel Mitrofanov
You can't use variables introduced in "proc" anywhere except on the right side of "-<". OK, you actually can do this, but your arrow should be an instance of ArrowApply (which means that you don't really need it at all, since all such arrows are in fact monads). Your "myProblem" is desugare

[Haskell-cafe] Beginners arrow question

2008-04-05 Thread Paul Johnson
I'm using arrows for the first time, with HXT. I think I'm getting the hang of it, but one problem has me stumped. I have a function "lookupFormatter" which takes a string and returns an arrow, and I want to use that arrow. Something like this: myProblem :: (ArrowXml a) -> a XmlTree String

[Haskell-cafe] Re: [Haskell] Some old and quite old news.

2008-04-05 Thread gwern0
On 2008.04.05 17:42:00 +0400, Serguey Zefirov <[EMAIL PROTECTED]> scribbled 0.6K characters: > [EMAIL PROTECTED] пишет: >> Hmm. I'm having trouble getting it through SVN: >> >> [EMAIL PROTECTED]:1003~>svn co http://thesz.mskhug.ru/browser/hiersort [ >> 1:44PM] >> svn: PROPFIND request failed on '/

[Haskell-cafe] DEFUN08: Call for Talks & Tutorials (co-located w/ ICFP08)

2008-04-05 Thread Matthew Fluet (ICFP Publicity Chair)
Call for Talks and Tutorials ACM SIGPLAN 2008 Developer Tracks on Functional Programming http://www.deinprogramm.de/defun-2008/ Victoria, BC, Canada, 25, 27 September, 2008 The workshop will be held in conjunction with ICFP 2008.

Re: [Haskell-cafe] Re: Doing without IORef

2008-04-05 Thread Bryan O'Sullivan
Jinwoo Lee wrote: > To summarize, embed IORef inside ReaderT and use that IORef to > read/change the file path info, both in IO monad and MyState monad. Is > this right? Yep. In case you ever want to multithread your program, you might want to use an MVar instead of an IORef. http://www

Re: [Haskell-cafe] Re: Doing without IORef

2008-04-05 Thread Jinwoo Lee
Thanks Bryan, To summarize, embed IORef inside ReaderT and use that IORef to read/change the file path info, both in IO monad and MyState monad. Is this right? Thank you all! jinwoo On Sat, Apr 5, 2008 at 1:56 AM, Bryan O'Sullivan <[EMAIL PROTECTED]> wrote: > Jinwoo Lee wrote: > > > I haven't

Re: [Haskell-cafe] Strange behavior of float literals

2008-04-05 Thread Miguel Mitrofanov
I don't know if it is a bug, but 1 = 0 (mod 2^32), so, if GHC considers exponent as Int (not Integer), then it's the same as 1e0 = 1. In the same way, 9 = -1 (mod 2^32), and 1e-(-1) = 1e1 = 10. Note als

Re: [Haskell-cafe] Strange behavior of float literals

2008-04-05 Thread David Benbennick
On Sat, Apr 5, 2008 at 1:00 AM, Vladimir Reshetnikov <[EMAIL PROTECTED]> wrote: > The float literal 1e-1 in > GHC evaluates to 1.0, and > 1e-9 evaluates to 10.0. > Is it a bug, or a documented overflow behavi

[Haskell-cafe] Strange behavior of float literals

2008-04-05 Thread Vladimir Reshetnikov
The float literal 1e-1 in GHC evaluates to 1.0, and 1e-9 evaluates to 10.0. Is it a bug, or a documented overflow behavior? What it the correct place to submit bug reports concerning GHC? -- Thank you, Vladim