RE: [Haskell] Weird field name mangling.

2006-11-23 Thread Simon Peyton-Jones
[Redirecting to ghc-bugs] That's a bug in 6.4.1 thank you. The reason has to do with z-encoding strings in case they are output to C-land. Happily the bug is not present in 6.6; I doubt we'll fix 6.4.1 now. I've added a test to make sure it does not creep back: drvrun022 Simon |

Re: [GHC] #1006: 'impossible' happened in reportNoInstance?

2006-11-23 Thread GHC
#1006: 'impossible' happened in reportNoInstance? -+-- Reporter: SamB | Owner: Type: bug | Status: closed Priority: normal |

Re: [GHC] #1023: Core Lint Errors: in result of Simplifier phase 0, iteration 1 out of 4, ss_atJ is out of scope

2006-11-23 Thread GHC
#1023: Core Lint Errors: in result of Simplifier phase 0, iteration 1 out of 4, ss_atJ is out of scope +--- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new

Re: [GHC] #1023: Core Lint Errors: in result of Simplifier phase 0, iteration 1 out of 4, ss_atJ is out of scope

2006-11-23 Thread GHC
#1023: Core Lint Errors: in result of Simplifier phase 0, iteration 1 out of 4, ss_atJ is out of scope +--- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new

Re: [GHC] #918: Fix HOpenAL's configure.ac bug that can't find OpenAL framework under Mac OS X

2006-11-23 Thread GHC
#918: Fix HOpenAL's configure.ac bug that can't find OpenAL framework under Mac OS X ---+ Reporter: guest | Owner: thorkilnaur Type: task | Status: new Priority:

Fix ghc-6.6 darcs-all for Mac OS X 10.4

2006-11-23 Thread Thorkil Naur
Hello, The following patch fixes ghc-6.6 darcs-all for Mac OS X 10.4. Best regards Thorkil New patches: [Fix darcs-all for Mac OS X Thorkil Naur [EMAIL PROTECTED]**20061123125539 The regular exporession /\? which is used by darcs-all to stand for zero or one /'s seems to be a GNU extension

Re: [GHC] #1024: Include cc1plus.exe into GHC distribution for Windows

2006-11-23 Thread GHC
#1024: Include cc1plus.exe into GHC distribution for Windows -+-- Reporter: guest| Owner: Type: feature request | Status: new Priority: normal |

[GHC] #1024: Include cc1plus.exe into GHC distribution for Windows

2006-11-23 Thread GHC
#1024: Include cc1plus.exe into GHC distribution for Windows +--- Reporter: guest| Owner: Type: feature request | Status: new Priority: normal | Milestone:

Re: [GHC] #1007: Add parsing (and some more) to the time package

2006-11-23 Thread GHC
#1007: Add parsing (and some more) to the time package -+-- Reporter: [EMAIL PROTECTED] | Owner: Type: proposal | Status: new Priority: normal |

Re: bignums, gmp, bytestring, .. ?

2006-11-23 Thread Peter Tanski
On Nov 22, 2006, at 8:39 PM, Donald Bruce Stewart wrote: p.tanski: to my knowledge, that would be the first Haskell implementation for PalmOS... Pretty sure Tony Sloane et al at Macquarie have had nhc98 running on the palm for quite a while. They've recently moved to YHC though, iirc.

[Haskell] SYB Documentation is inconclusive.

2006-11-23 Thread Arthur van Leeuwen
L.S., lately I've been playing with Data.Generics and records. I would like to write a generic method to output to e.g. CSV files. Given MissingH.CVS that problem reduces to a generic method to take lists of records to lists of lists with shown record fields, with as first element a list of

Re: [Haskell] base libraries

2006-11-23 Thread Chris Kuklewicz
This is a small reply to clarify the regular expression situation: Bulat Ziganshin wrote: Hello libraries, after analyzing the situation, i concluded that source of problem, at least partially, is GHC HQ's policy of packaging libraries with GHC. The list of such libraries is *closed* and

[Haskell] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Bayley, Alistair
http://channel9.msdn.com/Showpost.aspx?postid=231495 The links to the video are a couple of yellow buttons at the bottom of the article: Watch or Download. I haven't watched this yet (it's nearly an hour long, I think). Found via reddit (http://reddit.com). Haskeller's on TV (sort of...) woot

[Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Cale Gibbard
On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote: A comment on that video said: - BEGIN QUOTE It seems to me that STM creates new problems with composability. You create two classes of code: atomic methods and non atomic methods. Nonatomic methods can easily call atomic ones – the

[Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Benjamin Franksen
[sorry for quoting so much, kinda hard to decide here where to snip] Cale Gibbard wrote: On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote: A comment on that video said: - BEGIN QUOTE It seems to me that STM creates new problems with composability. You create two classes of code:

RE: [Haskell] SYB Documentation is inconclusive.

2006-11-23 Thread Ralf Lammel
Arthur, constrFields eventually returns some mangled strings from the abstract syntax tree; see ghc-fptools/ghc/compiler/basicTypes/DataCon.lhs; and that abstract syntax promises to be order-preserving. It says (not surprisingly): dcFields :: [FieldLabel], -- Field

Re: [Haskell] SYB Documentation is inconclusive.

2006-11-23 Thread Arthur van Leeuwen
On 23-nov-2006, at 23:22, Ralf Lammel wrote: Arthur, constrFields eventually returns some mangled strings from the abstract syntax tree; see ghc-fptools/ghc/compiler/basicTypes/ DataCon.lhs; and that abstract syntax promises to be order-preserving. It says (not surprisingly):

[Haskell] ANNOUNCE: PQC: QuickCheck in the Age of Concurrency

2006-11-23 Thread Donald Bruce Stewart
PQC: QuickCheck in the Age of Concurrency An SMP parallel QuickCheck driver Do you: * Have (or want) lots of QuickCheck properties? * Run

[Haskell-cafe] Difficult memory leak in array processing

2006-11-23 Thread Niko Korhonen
Hi everyone, I have the following code whose purpose is to add dither (noise) to a given array. The code looks very straightforward but apparently it has a memory leak somewhere. Here I try to run the algorithm for an array of 10,000,000 integers. Ten million unboxed strict integers should equal

Re: [Haskell-cafe] Difficult memory leak in array processing

2006-11-23 Thread isto
Hi Niko, to, 2006-11-23 kello 12:11 +0200, Niko Korhonen kirjoitti: I've tried applying seq and some other strictness tricks (such as x == x) pretty much everywhere on the code with no results. Could you please help me understand what is going on here? Have I misunderstood something critical

[Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Bayley, Alistair
http://channel9.msdn.com/Showpost.aspx?postid=231495 The links to the video are a couple of yellow buttons at the bottom of the article: Watch or Download. I haven't watched this yet (it's nearly an hour long, I think). Found via reddit (http://reddit.com). Haskeller's on TV (sort of...) woot

Re: [Haskell-cafe] Difficult memory leak in array processing

2006-11-23 Thread Udo Stenzel
Niko Korhonen wrote: I have the following code whose purpose is to add dither (noise) to a given array. The code looks very straightforward but apparently it has a memory leak somewhere. No, it doesn't. It can't, because it doesn't even compile. After correcting the obvious (lo,

[Haskell-cafe] Re: Difficult memory leak in array processing

2006-11-23 Thread apfelmus
Ah, yet another UndeadArray necromancer exhausting his stack of bones. May the forces of light suggest to structure the incantation of darkness? modifyArray arr i f = readArray arr i = \y - writeArray arr i (f y) accumM :: (MArray a e m, Ix i) = (e - e' - e) - a i e -

[Haskell-cafe] Re: Difficult memory leak in array processing

2006-11-23 Thread apfelmus
Udo Stenzel wrote: Niko Korhonen wrote: I have the following code whose purpose is to add dither (noise) to a given array. The code looks very straightforward but apparently it has a memory leak somewhere. No, it doesn't. It can't, because it doesn't even compile. After correcting the

Re: [Haskell-cafe] LLVM back end

2006-11-23 Thread Kenneth Hoste
On 20 Nov 2006, at 08:27, Michael T. Richter wrote: I've been eyeing LLVM[1] as interesting technology -- brief executive summary: a virtual machine suited as the back end of compiler output with optimised native code then coming from it as either JIT-based execution of the LLVM bytecode

[Haskell-cafe] Re: Type Error. Why!?

2006-11-23 Thread Joachim Durchholz
Neil Mitchell schrieb: How is this an FAQ: http://www.haskell.org/haskellwiki/Why_Haskell_just_works It's a nice piece of marketing, but I can't imagine anyone has ever asked Why Haskell just works, unless they've already used it, in which case they've moved past an FAQ. Oh, but that kind of

[Haskell-cafe] list monad and controlling the backtracking

2006-11-23 Thread isto
Hi all, Weekly news had a link to article Local and global side effects with monad transformers and the following is from there (minor modification done): import Control.Monad.List import Control.Monad.State import Control.Monad.Writer test5 :: StateT Integer (ListT (Writer [Char])) Integer

Re: [Haskell-cafe] type keeping rounding, typeable (and a difficulty)

2006-11-23 Thread isto
Hi thanks! to, 2006-11-16 kello 14:02 -0800, Greg Buchholz kirjoitti: ] I'll guess the reason it didn't compile was different ] types at case branches (am I wrong?) Correct. ] Anyhow, do you know that is it possible to choose the return type ] somehow in the spirit above?

[Haskell-cafe] Re: list monad and controlling the backtracking

2006-11-23 Thread Benjamin Franksen
isto wrote: Hi all, Weekly news had a link to article Local and global side effects with monad transformers and the following is from there (minor modification done): import Control.Monad.List import Control.Monad.State import Control.Monad.Writer test5 :: StateT Integer (ListT

Re: [Haskell-cafe] Equivalent of if/then/else for IO Bool?

2006-11-23 Thread Jason Dagit
On 11/23/06, Dougal Stanton [EMAIL PROTECTED] wrote: Is there some sort of equivalent of the if/then/else construct for use in the IO monad? For instance the following can get quite tedious: do bool - doesFileExist filename if bool then sth else sth' Is there a more compact way of

[Haskell-cafe] Re: Equivalent of if/then/else for IO Bool?

2006-11-23 Thread Benjamin Franksen
Dougal Stanton wrote: Is there some sort of equivalent of the if/then/else construct for use in the IO monad? For instance the following can get quite tedious: do bool - doesFileExist filename if bool then sth else sth' Is there a more compact way of writing that? Something

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Cale Gibbard
On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote: A comment on that video said: - BEGIN QUOTE It seems to me that STM creates new problems with composability. You create two classes of code: atomic methods and non atomic methods. Nonatomic methods can easily call atomic ones – the

Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Benjamin Franksen
[sorry for quoting so much, kinda hard to decide here where to snip] Cale Gibbard wrote: On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote: A comment on that video said: - BEGIN QUOTE It seems to me that STM creates new problems with composability. You create two classes of code:

RE: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Tim Harris (RESEARCH)
(Dropping [EMAIL PROTECTED]) Hi, We've not yet looked at I/O in detail in Haskell, but there's a paper from a few years back where I experimented with ways of integrating I/O with an earlier implementation of atomic blocks in Java. http://research.microsoft.com/~tharris/papers/2005-scp.pdf

Re: [Haskell-cafe] type keeping rounding, typeable (and a difficulty)

2006-11-23 Thread John Meacham
On Thu, Nov 16, 2006 at 10:44:59PM +0200, isto wrote: I'll guess the reason it didn't compile was different types at case branches (am I wrong?) Anyhow, do you know that is it possible to choose the return type somehow in the spirit above? GADTs let you do this. And they even omit the

Re: [Haskell-cafe] Equivalent of if/then/else for IO Bool?

2006-11-23 Thread Henk-Jan van Tuyl
You can use 'when' or 'unless' from the module Control.Monad, but they each have only one branch, see: http://members.chello.nl/hjgtuyl/tourdemonad.html#unless and http://members.chello.nl/hjgtuyl/tourdemonad.html#when You can create a monadic 'if' like this (in an interactive session):

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Liyang HU
Hi, On 23/11/06, Benjamin Franksen [EMAIL PROTECTED] wrote: One answer is in fact to make it so that Console.Write can be rolled back too. To achieve this one can factor the actual output to another task and inside the transaction merely send the message to a transactional channel (TChan):

Re: [Haskell-cafe] working with lists of couples

2006-11-23 Thread Clare
Yes the code you are suggesting is certainly linear and it takes without doubt time n. But I was looking for a solution using foldl that of course takes time n. The problem of the following solution is that it gives a reversed result, and of course i can't just reverse the result. couples = snd

Re: [Haskell-cafe] Equivalent of if/then/else for IO Bool?

2006-11-23 Thread Conor McBride
Jason Dagit wrote: On 11/23/06, Dougal Stanton [EMAIL PROTECTED] wrote: Is there some sort of equivalent of the if/then/else construct for use in the IO monad? For instance the following can get quite tedious: do bool - doesFileExist filename if bool then sth else sth' Is there a

[Haskell-cafe] Re: [Haskell] Re: SimonPJ and Tim Harris explain STM - video

2006-11-23 Thread Benjamin Franksen
Hi Liyang HU you wrote: On 23/11/06, Benjamin Franksen [EMAIL PROTECTED] wrote: One answer is in fact to make it so that Console.Write can be rolled back too. To achieve this one can factor the actual output to another task and inside the transaction merely send the message to a

Re: [Haskell-cafe] Command line prompt templates

2006-11-23 Thread Donald Bruce Stewart
ithika: I was trying to write my own equivalent to Don Stewart's mkcabal but ended up getting sidetracked. I made some generalised prompts for use at the command line and wanted to get some feedback on them. The full code can be found at [1] but the basic summary is like this: prompt ::

[Haskell-cafe] strange type mismatch when trying to use takusen

2006-11-23 Thread Seth Gordon
I have a simple test program for takusen and PostgreSQL: import Database.Enumerator import Database.PostgreSQL.Enumerator import Control.Monad.Trans gazdbSession dbname = connect [CAdbname dbname] resultCollector :: (Monad m) = String - IterAct m [String] resultCollector str accum = result'

Re: [Haskell-cafe] Equivalent of if/then/else for IO Bool?

2006-11-23 Thread Luis F. Araujo
Dougal Stanton wrote: Is there some sort of equivalent of the if/then/else construct for use in the IO monad? For instance the following can get quite tedious: do bool - doesFileExist filename if bool then sth else sth' Is there a more compact way of writing that?

Re: [Haskell-cafe] strange type mismatch when trying to use takusen

2006-11-23 Thread Taral
On 11/23/06, Seth Gordon [EMAIL PROTECTED] wrote: takusen-test.hs:11:57: Couldn't match expected type `forall mark. DBM mark Session a' against inferred type `DBM mark sess ()' In the second argument of `($)', namely `main'' In the expression: (withSession

Re: [Haskell-cafe] question about How to Write a Haskell Program tutorial

2006-11-23 Thread Donald Bruce Stewart
mvanier: First off, I apologize if this has come up before. As far as I can tell, the mailing list archives don't have a search function. I'm running ghc-6.6 and haddock-0.8, both compiled from source. I'm working my way through the How to Write a Haskell Program tutorial (which is a

Re: [Haskell-cafe] Command line prompt templates

2006-11-23 Thread Antti-Juhani Kaijanaho
Donald Bruce Stewart wrote: Looks pretty good, though you use case x :: Bool of True - ... False - ... when if x then ... else ... would be preferred. Why? Personally, I find boolean case to feel better wrt layout and I see no loss of clarity in its use.