[Haskell-cafe] Re: Guidance on using asynchronous exceptions

2007-11-16 Thread Simon Marlow
Yang wrote: To follow up on my previous post (Asynchronous Exceptions and the RealWorld), I've decided to put together something more concrete in the hopes of eliciting response. I'm trying to write a library of higher-level concurrency abstractions, in particular for asynchronous systems

[Haskell-cafe] Re: emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Valery V. Vorotyntsev
On 11/16/07, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote: Add the following lines to your ~/.emacs: Adding buffer name to confirmation message: --- BEGIN --- (defun delete-trailing-whitespace-if-confirmed () Delete all the trailing whitespace across the current buffer, asking user

RE: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-16 Thread SevenThunders
Simon Peyton-Jones wrote: Alberto, SevenThunders, Joel, Glark. This is not good. Thank you for being so polite about it. And thanks for working on a reproducible test case -- without that we are 100% stuck. We did fix one just-possibly-related bug in 6.8 recently, which concerned

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Valery V. Vorotyntsev
On 11/16/07, Denis Bueno [EMAIL PROTECTED] wrote: For one thing, if you happen to write code shared with other people who do not use this hook, then you may end up causing *huge* numbers of spurious differences in diff(1) output. There may be an easy way to deal with this, but, it is a

[Haskell-cafe] The percent operator

2007-11-16 Thread PR Stanley
Hi I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? Cheers, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Knot tying vs monads

2007-11-16 Thread John D. Ramsdell
This is another Haskell style question. I had some trouble with the pretty printer that comes with GHC, so I translated one written in Standard ML. I have already translated the program into C, so rewriting it in Haskell was quick and easy for me. The Standard ML version uses a reference cell

Re: [Haskell-cafe] let vs. where

2007-11-16 Thread Henning Thielemann
On Fri, 16 Nov 2007, jeff p wrote: A function is an expression whose type is an arrow; e.g. Int - Int. The type of taxRate is (Fractional t) = t. I had this misunderstanding too, when starting with Haskell. In other languages there are functions with zero, one or more arguments. In contrast

Re: Re[2]: [Haskell-cafe] the interact function and Hugs/ghci on Windows ...

2007-11-16 Thread Neil Mitchell
Hi Bulat, The released version of WinHugs does not support Ctrl+Z or Ctrl+D, but the development builds do. btw, are you plan to release hugs version compatible with ghc 6.8? That would make sense, and I suspect Ross will want to (he's in charge of Hugs stuff). I am super-busy until after

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-16 Thread Michael McNeil Forbes
Just out of curiosity, what LAPACK and BLAS implementation is causing problems? I have no idea if there is anything related, but I have been having similar sounding problems with python when using the latest ATLAS library on 64 bit core 2 machines. I am beginning to suspect that there

[Haskell-cafe] Re: Knot tying vs monads

2007-11-16 Thread apfelmus
John D. Ramsdell wrote: This is another Haskell style question. I had some trouble with the pretty printer that comes with GHC, so I translated one written in Standard ML. I have already translated the program into C, so rewriting it in Haskell was quick and easy for me. Concerning the

RE: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-16 Thread Simon Peyton-Jones
Alberto, SevenThunders, Joel, Glark. This is not good. Thank you for being so polite about it. And thanks for working on a reproducible test case -- without that we are 100% stuck. We did fix one just-possibly-related bug in 6.8 recently, which concerned the use of {-# UNPACK #-} on strict

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Denis Bueno
On Nov 16, 2007 12:05 PM, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote: On 11/16/07, Brent Yorgey [EMAIL PROTECTED] wrote: Nice! Is there a way to have this only run if the current buffer is in haskell-mode? I'd add it myself but I've not yet taken the plunge to being an elisp hacker.

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-16 Thread Olivier Boudry
On 11/16/07, Duncan Coutts [EMAIL PROTECTED] wrote: On Thu, 2007-11-15 at 21:55 -0500, Olivier Boudry wrote: By the way, what's the reason dropSpaceEnd is defined but not exported nor used through a rule? I'm just curious. We decided when trying to standardise the API to start with just

[Haskell-cafe] Re: let vs. where

2007-11-16 Thread John Lato
This actually clears up something that's been bothering me for some time. I've never really like syntax of types for functions with multiple arguments. Using the same token, -, to separate both arguments and the result seems very poor, because when reading a type you don't know if the value

Re: [Haskell-cafe] The percent operator

2007-11-16 Thread Philip Armstrong
On Fri, Nov 16, 2007 at 02:44:33PM +, PR Stanley wrote: I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? It's not in the Prelude, it's in the Ratio module IIRC. Phil

Re: [Haskell-cafe] the interact function and Hugs/ghci on Windows ...

2007-11-16 Thread Neil Mitchell
Hi The released version of WinHugs does not support Ctrl+Z or Ctrl+D, but the development builds do. If you download: http://haskell.org/hoogle/other/winhugs-interact-fixes-2006-oct-25.zip and replace the WinHugs.exe with this new one then you should get that functionality. Thanks Neil On

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-16 Thread Duncan Coutts
On Thu, 2007-11-15 at 21:55 -0500, Olivier Boudry wrote: By the way, what's the reason dropSpaceEnd is defined but not exported nor used through a rule? I'm just curious. We decided when trying to standardise the API to start with just the equivalents of the Data.List functions. We have

[Haskell-cafe] cabal Main-Is restriction

2007-11-16 Thread Nicolas Frisby
It seems the meaning of the -main-is switch for GHC and the Main-Is build option for Cabal executables differ. With GHC, I can point to any function main in any module, but in Cabal I must point to a filename with precisely the module name Main. This is tying my hands with regard to organizing a

Re: [Haskell-cafe] let vs. where

2007-11-16 Thread Arnar Birgisson
On Nov 16, 2007 12:26 AM, Lennart Augustsson [EMAIL PROTECTED] wrote: On Nov 14, 2007 1:05 AM, Robin Green [EMAIL PROTECTED] wrote: On Tue, 13 Nov 2007 13:51:13 -0800 Dan Piponi [EMAIL PROTECTED] wrote: Up until yesterday I had presumed that guards only applied to functions. But I

[Haskell-cafe] Re: Guidance on using asynchronous exceptions

2007-11-16 Thread Yang
oleg-at-pobox.com |haskell-cafe| wrote: Yang wrote: (Something like this is straightforward to build if I abandon Concurrent Haskell and use cooperative threading, and if the operations I wanted to perform could be done asynchronously.) All operations could be done asynchronously, at least on

[Haskell-cafe] Re: Guidance on using asynchronous exceptions

2007-11-16 Thread oleg
Yang wrote: Furthermore, is there any way to embed this information [about async execptions] in the type system, so that Haskellers don't produce async-exception-unaware code? (Effectively, introducing checked interrupts?) Yes, it is possible to make the information about exceptions and

Re[2]: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-16 Thread Bulat Ziganshin
Hello Duncan, Friday, November 16, 2007, 2:43:05 PM, you wrote: Alternatively, someone should make the case for why it should be added to bytestring but not list. the reason is very simple - FPS lib is upgradeable, so there is no problems if its various versions are not compatible with each

Re: [Haskell-cafe] Re: Knot tying vs monads

2007-11-16 Thread Brent Yorgey
but isn't there a short text that describes in detail why foldl' is different from foldl and why foldr is better in many cases? I thought this faq would have been cached already :) Perhaps you're thinking of http://haskell.org/haskellwiki/Stack_overflow ? -Brent

Re: [Haskell-cafe] The percent operator

2007-11-16 Thread Brent Yorgey
On Nov 16, 2007 9:44 AM, PR Stanley [EMAIL PROTECTED] wrote: Hi I understand 2%4 will construct a fraction in Haskell. I've tried this in GHCI but got an error message. Is there such an operator in Prelude and if so how is it applied? Cheers, Paul It's in Data.Ratio. Prelude :m

Re: [Haskell-cafe] HTTP actions proxy server

2007-11-16 Thread Jim Burton
Justin Bailey wrote: I think it needs to be a real URL: setProxy (Proxy http://myproxy:80; Nothing) Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe The docs say

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Brent Yorgey
On Nov 16, 2007 11:14 AM, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote: Add the following lines to your ~/.emacs: --- BEGIN OF ELISP CODE --- ;(global-set-key (kbd f9 s) 'delete-trailing-whitespace) (defun delete-trailing-whitespace-if-confirmed () Delete all the trailing

Re: [Haskell-cafe] RFC: demanding lazy instances of Data.Binary

2007-11-16 Thread Don Stewart
nicolas.frisby: I've noticed a few posts on the cafe, including my own experience, where the spine-strictness of the Binary instance for lists caused some confusion. I'd like to suggest an approach to preventing this confusion in the future, or at least making it easier to resolve. Having

[Haskell-cafe] Re: List of all powers

2007-11-16 Thread apfelmus
Calvin Smith wrote: I really look forward to apfelmus' consistently outstanding explanations on haskell-cafe. If some of the especially good ones were bundled up as book -- *Intermediate/Advanced Functional Programming with Haskell* -- I would buy it sight unseen (hint, hint). :) I intend

[Haskell-cafe] Re: Guidance on using asynchronous exceptions

2007-11-16 Thread Aaron Denney
On 2007-11-16, Yang [EMAIL PROTECTED] wrote (quoting a paper): This style of concurrency is, of course, not new. Component architectures where data flows through components (rather than control) have been called 'actor-oriented' [35]. These can take many forms. Unix pipes resemble PN, although

[Haskell-cafe] dropSpace not exported in ByteString

2007-11-16 Thread Olivier Boudry
Hi all, I'm writing a Haskell program to do some address cleansing. The program uses the ByteString library. Data.ByteString.Char8 documentations shows functions for removing whitespace from start or end of a ByteString. Those functions are said to be more efficient than the dropWhile / reverse

Re: [Haskell-cafe] Re: Flymake Haskell

2007-11-16 Thread Philip Armstrong
On Thu, Nov 15, 2007 at 02:56:32PM +0900, Daisuke IKEGAMI wrote: Dear Stefan and Haskell-Cafe, Thanks to keeping your interest to the flymake-mode for Haskell. Stefan wrote: Could you explain to me what flycheck_haskell.pl does, and give an example of a problematic situation solved by the use

Re: [Haskell-cafe] RFC: demanding lazy instances of Data.Binary

2007-11-16 Thread Don Stewart
dons: nicolas.frisby: I've noticed a few posts on the cafe, including my own experience, where the spine-strictness of the Binary instance for lists caused some confusion. I'd like to suggest an approach to preventing this confusion in the future, or at least making it easier to resolve.

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-16 Thread Alberto Ruiz
Simon, I have only tested 32-bit machines, I will try to test also on 64-bit. Michael, I have also observed strange ATLAS behavior. For example, I can make atlas3-sse2 segfault on big matrices (1000x1000) in ubuntu 6.06 and 7.04, so I typically use atlas3-base. In fact, I found a similar

Re: [Haskell-cafe] A small question

2007-11-16 Thread Andrew Coppin
Sebastian Sylvan wrote: On Nov 15, 2007 6:56 PM, Andrew Coppin [EMAIL PROTECTED] wrote: I notice that in GHC 6.8.1, if I compile a runnably program, as well as generating foo.exe, GHC now also generates a file foo.exe.manifest, which appears to contain some kind of XML data. Anybody know

[Haskell-cafe] RFC: demanding lazy instances of Data.Binary

2007-11-16 Thread Nicolas Frisby
I've noticed a few posts on the cafe, including my own experience, where the spine-strictness of the Binary instance for lists caused some confusion. I'd like to suggest an approach to preventing this confusion in the future, or at least making it easier to resolve. Having decided that it is

[Haskell-cafe] Showing Data.Ratio - different on GHC vs Hugs/Yhc

2007-11-16 Thread Neil Mitchell
Hi Under Hugs and Yhc, showing a Ratio 1%2 gives 1 % 2. Under GHC showing 1%2 gives 1%2. Does the standard say anything about this? Is someone wrong? And how do Yhc/nhc/Hugs pass Bernouilli in the Nofib suite given that the output doesn't match? Thanks Neil

Re: [Haskell-cafe] Haskellforge?

2007-11-16 Thread Henning Thielemann
On Thu, 15 Nov 2007, Duncan Coutts wrote: On Thu, 2007-11-15 at 15:56 -0200, Maurí­cio wrote: Hi, Is there a Haskellforge somewhere, i.e., something like a sourceforge for open source Haskell programs, with darcs, automatic cabalization etc.? Has anyone tried that already? There

Re: [Haskell-cafe] Chart plotting libraries

2007-11-16 Thread David Roundy
On Thu, Nov 15, 2007 at 10:35:06PM -, Tim Docker wrote: droundy: Chart has rather a complicated API. I've written a simpler API (but somewhat less flexible), if anyone's interested (Tim wasn't). My API is closer in complexity (of use) to matlab's plotting. I'd describe the API as

Re: [Haskell-cafe] A small question

2007-11-16 Thread Andrew Coppin
J. Garrett Morris wrote: http://msdn2.microsoft.com/en-us/library/1w45z383(vs.71).aspx I believe. Interesting. Not sure what the connection between Haskell and .NET is... (But then, despite a lot of research, I don't know what .NET is.) ___

Re: [Haskell-cafe] Haskellforge?

2007-11-16 Thread Don Stewart
briqueabraque: Hi, Is there a Haskellforge somewhere, i.e., something like a sourceforge for open source Haskell programs, with darcs, automatic cabalization etc.? Has anyone tried that already? We use http://community.haskell.org/ which you can ask for an account on. with darcs

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-16 Thread Olivier Boudry
On 11/15/07, Don Stewart [EMAIL PROTECTED] wrote: Let me know if the rule fires. If it isn't, that's a bug, essentially. -- Don Don, As you can see the rule fires. C:\Tempghc --make -O2 -fasm -ddump-simpl-stats DropSpaceTest.hs ... 3 RuleFired 1 FPS pack/packAddress 2 FPS

[Haskell-cafe] A small question

2007-11-16 Thread Andrew Coppin
I notice that in GHC 6.8.1, if I compile a runnably program, as well as generating foo.exe, GHC now also generates a file foo.exe.manifest, which appears to contain some kind of XML data. Anybody know anything about this mysterious file? ___

Re[2]: [Haskell-cafe] the interact function and Hugs/ghci on Windows ...

2007-11-16 Thread Bulat Ziganshin
Hello Neil, Friday, November 16, 2007, 3:07:57 PM, you wrote: The released version of WinHugs does not support Ctrl+Z or Ctrl+D, but the development builds do. btw, are you plan to release hugs version compatible with ghc 6.8? -- Best regards, Bulatmailto:[EMAIL

Re: [Haskell-cafe] A small question

2007-11-16 Thread Sebastian Sylvan
On Nov 15, 2007 6:56 PM, Andrew Coppin [EMAIL PROTECTED] wrote: I notice that in GHC 6.8.1, if I compile a runnably program, as well as generating foo.exe, GHC now also generates a file foo.exe.manifest, which appears to contain some kind of XML data. Anybody know anything about this

Re: [Haskell-cafe] Erik Meijer's talk at Google?

2007-11-16 Thread David Benbennick
Google's Tech Talks channel is at http://www.youtube.com/googletechtalks. There doesn't seem to be any video of Erik Meijer there. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Valery V. Vorotyntsev
On 11/16/07, Brent Yorgey [EMAIL PROTECTED] wrote: Nice! Is there a way to have this only run if the current buffer is in haskell-mode? I'd add it myself but I've not yet taken the plunge to being an elisp hacker. Try adding ``(eq major-mode 'haskell-mode)'' after the `and' .. .. but why

[Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-16 Thread Valery V. Vorotyntsev
Add the following lines to your ~/.emacs: --- BEGIN OF ELISP CODE --- ;(global-set-key (kbd f9 s) 'delete-trailing-whitespace) (defun delete-trailing-whitespace-if-confirmed () Delete all the trailing whitespace across the current buffer, asking user for confirmation. (if (and

Re: [Haskell-cafe] Re: let vs. where

2007-11-16 Thread Jules Bean
John Lato wrote: This actually clears up something that's been bothering me for some time. I've never really like syntax of types for functions with multiple arguments. Using the same token, -, to separate both arguments and the result seems very poor, because when reading a type you don't

Re: [Haskell-cafe] Showing Data.Ratio - different on GHC vs Hugs/Yhc

2007-11-16 Thread David Menendez
On Nov 16, 2007 2:12 PM, Neil Mitchell [EMAIL PROTECTED] wrote: Under Hugs and Yhc, showing a Ratio 1%2 gives 1 % 2. Under GHC showing 1%2 gives 1%2. Does the standard say anything about this? Is someone wrong? And how do Yhc/nhc/Hugs pass Bernouilli in the Nofib suite given that the output

Re: [Haskell-cafe] Showing Data.Ratio - different on GHC vs Hugs/Yhc

2007-11-16 Thread Twan van Laarhoven
Neil Mitchell wrote: Hi Under Hugs and Yhc, showing a Ratio 1%2 gives 1 % 2. Under GHC showing 1%2 gives 1%2. Does the standard say anything about this? Is someone wrong? Yes, ghc is wrong here, the Haskell 98 report [1] specifies: instance (Integral a) = Show (Ratio a) where

[Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-16 Thread Dimitry Golubovsky
Hi, For those of you who are interested in using Haskell in client-side web application programming: I have added a new demo/test program to this Wiki page (Does it leak?): http://haskell.org/haskellwiki/Yhc/Javascript This demo program shows some progress made since the first announcement of