RE: Summary of GHC 6.6 test suite failures on MSYS/MinGW

2006-09-18 Thread Simon Peyton-Jones
Dont worry about Maessen_hashtab. It fails core Lint, and its on my list to look at. (Its been failing for some time) S From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Smith Sent: 13 September 2006 18:23 To: glasgow-haskell-bugs@haskell.org Subject:

Re: [GHC] #900: SPECIALISE broken

2006-09-18 Thread GHC
#900: SPECIALISE broken ---+ Reporter: simonmar | Owner: Type: bug | Status: closed Priority: normal| Milestone: 6.6 Component: Compiler |Version: 6.5

threadDelay not ending

2006-09-18 Thread Rich Fought
I've got some unit test code that forks off test processes using the 'system' function and then delays using 'threadDelay' to synchronize with the test process. This has worked fine until I upgraded to 6.4.2, now some of the 'threadDelay' calls never return - it's like they are stuck in

Re: threadDelay not ending

2006-09-18 Thread Seth Kurtzberg
What is your environment? My project (which is about 70% Haskell) makes extensive use of threadDelay. I've not seen this behavior with 6.4.2. My environment is Linux using a recent 2.6 kernel. For obvious reasons I need to know whether there is a threadDelay issue here that is preparing to

Re: threadDelay not ending

2006-09-18 Thread Rich Fought
I am running on Red Hat Enterprise Linux with the latest RH 2.6 kernel. This is very bizarre and I am having a hard time figuring out what is going on. I don't see any issues in the project code itself, just my unit tests. Rich Seth Kurtzberg wrote: What is your environment? My project

RE: ANNOUNCE: GHC 6.6 Release Candidate

2006-09-18 Thread Simon Peyton-Jones
Excellent example. It's very hard to give good error messages for impredicative polymorphism. I've tried to improve this one a bit. (Test is tcfail165.hs) Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- | [EMAIL PROTECTED] On Behalf Of Tomasz

Re: threadDelay not ending

2006-09-18 Thread Seth Kurtzberg
On Mon, 18 Sep 2006 11:56:21 -0500 Rich Fought [EMAIL PROTECTED] wrote: I am running on Red Hat Enterprise Linux with the latest RH 2.6 kernel. This is very bizarre and I am having a hard time figuring out what is going on. I don't see any issues in the project code itself, just my unit

Change Data.Bits.rotate to rotate Integer (unbounded) types

2006-09-18 Thread Peter Tanski
Welcome back! Since Data.Bits is not defined in the Haskell 1998 standard, are we free to change the implementation of Data.Bits? if we are free to change the implementation of Data.Bits, would it be all right to change the operation of rotate, rotateL and rotateR over unbounded types

[Haskell] Haskell Weekly News: September 18, 2006

2006-09-18 Thread Donald Bruce Stewart
--- Haskell Weekly News http://haskell.org/haskellwiki/HWN Issue 41 - September 18, 2006 --- Welcome to issue 41 of HWN, a weekly newsletter covering

Re: [Haskell] Haskell Weekly News: September 18, 2006

2006-09-18 Thread David House
On 18/09/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: * SOE implementation based on Gtk2Hs . Duncan Coutts [15]Due to popular demand the new SOE implementation based on Gtk2Hs is [16]available. The rendering quality is better than the original HGL version. [17]Here's a

[Haskell-cafe] Problems interpreting

2006-09-18 Thread Carajillu
Hi, I'm a student and I have to do a program with Haskell. This is the first time I use this languaje, and I'm having problems with the indentation. I want to check if this function is correct, but when I try to make the GHCi interpret it, I get line 18:parse error (possibly incorrect

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 02:51:34AM -0700, Carajillu wrote: Hi, I'm a student and I have to do a program with Haskell. This is the first time I use this languaje, and I'm having problems with the indentation. I want to check if this function is correct, but when I try to make the GHCi

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Ketil Malde
Carajillu [EMAIL PROTECTED] writes: I get line 18:parse error (possibly incorrect indentation) ..which is a bit misleading, as the problem is on the preceeding line of code. if x == e then return l2 And if x /= e? What is check_elem then?¹ -- Tries to match two lists. If

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 12:54:34PM +0200, Albert Crespi wrote: Thank you very much for your reply! As I said, it is my first experience with Haskell, I have been programming in Java and C for some years, and I find this language very different from them. Anyway I'll try to fix the function

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Carajillu
Wow! I'm starting to love this languaje, and the people who uses it!:) Andrea Rossato wrote: On Mon, Sep 18, 2006 at 12:54:34PM +0200, Albert Crespi wrote: Thank you very much for your reply! As I said, it is my first experience with Haskell, I have been programming in Java and C for

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 04:16:55AM -0700, Carajillu wrote: Wow! I'm starting to love this languaje, and the people who uses it!:) You spoke too early. My code had a bug, a huge one... this is the right one: -- Replaces a wildcard in a list with the list given as the third argument

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Neil Mitchell
Hi check_elem (x:xs) = if x == e then (l2 ++ xs) else [x] ++ check_elem xs Why not: check_elem (x:xs) = if x == e then (l2 ++ xs) else x : check_elem xs Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 12:25:21PM +0100, Neil Mitchell wrote: Why not: check_elem (x:xs) = if x == e then (l2 ++ xs) else x : check_elem xs Thanks Thank you! Lists are my personal nightmare...;-) Andrea ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Jón Fairbairn
Andrea Rossato [EMAIL PROTECTED] writes: On Mon, Sep 18, 2006 at 04:16:55AM -0700, Carajillu wrote: Wow! I'm starting to love this languaje, and the people who uses it!:) You spoke too early. My code had a bug, a huge one... this is the right one: -- Replaces a wildcard in a

[Haskell-cafe] Re: Why is type 'b' forced to be type 'm a' and not possibly 'm a - m a' (Anatoly Zaretsky)

2006-09-18 Thread Vivian McPhail
Message: 6 Date: Fri, 15 Sep 2006 18:36:35 +0300 From: Anatoly Zaretsky [EMAIL PROTECTED] Subject: Re: [Haskell-cafe] Why is type 'b' forced to be type 'm a' and not possibly 'm a - m a' To: Vivian McPhail [EMAIL PROTECTED] Cc: Haskell Cafe haskell-cafe@haskell.org Message-ID:

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Bulat Ziganshin
Hello Carajillu, Monday, September 18, 2006, 1:51:34 PM, you wrote: Hi, I'm a student and I have to do a program with Haskell. This is the first time I use this languaje, and I'm having problems with the indentation. I want to check if this function is correct, but when I try to make the GHCi

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 12:42:59PM +0100, Jón Fairbairn wrote: And if you do that, you can write it like this: subst e l' = concat . map subst_elem where subst_elem x | x == e = l' | otherwise = [x] Pretty. Just to many keystrokes.

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Carajillu
Finally I took Andrea's solution check_elem (x:xs) = if x == e then (l2 ++ xs) else [x] ++ check_elem xs I think it's easy to understand for me ( in my noob level), than the recursive one. I'm testing it and it's working really well. The other solutions are a little complicated for me, but I'm

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Carajillu
Not a good solution, it just substitutes the first occurrence of the item in the list. I'll try the others Carajillu wrote: Finally I took Andrea's solution check_elem (x:xs) = if x == e then (l2 ++ xs) else [x] ++ check_elem xs I think it's easy to understand for me ( in my noob level),

Re[2]: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Bulat Ziganshin
Hello Andrea, Monday, September 18, 2006, 3:22:43 PM, you wrote: substitute e l1 l2= [c | c - check_elem l1] why not just substitute e l1 l2= check_elem l1 ? :) where check_elem [] = l1 should be where check_elem [] = [] otherwise you just append second (backup? :) copy of

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 05:42:47AM -0700, Carajillu wrote: Not a good solution, it just substitutes the first occurrence of the item in the list. I'll try the others I did not get this point. You must take Jón's approach with map. andrea ___

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 02:52:45PM +0200, Andrea Rossato wrote: On Mon, Sep 18, 2006 at 05:42:47AM -0700, Carajillu wrote: Not a good solution, it just substitutes the first occurrence of the item in the list. I'll try the others I did not get this point. You must take Jón's approach

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 05:35:47AM -0700, Carajillu wrote: I'm testing it and it's working really well. The other solutions are a little complicated for me, but I'm still trying to undestand them. Jón's approach (the last version of his message), usually cleaner and more concise, is called

Re: [Haskell-cafe] Problems interpreting

2006-09-18 Thread Carajillu
Definitely I'll take this solution, I'm reading about Pointfree, I think it's not that dificult to understand. And moreover it's the simpliest way to write code. Jón Fairbairn-2 wrote: Andrea Rossato [EMAIL PROTECTED] writes: On Mon, Sep 18, 2006 at 04:16:55AM -0700, Carajillu wrote:

Re[2]: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Bulat Ziganshin
Hello Andrea, Monday, September 18, 2006, 4:23:21 PM, you wrote: subst e l' = concat . map subst_elem where subst_elem x | x == e = l' | otherwise = [x] Pretty. Just to many keystrokes. This should take two keystrokes less,

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 04:52:33PM +0400, Bulat Ziganshin wrote: but the goal is not keystrokes itself but easy of understanding. for me, first solution looks rather idiomatic and intuitively understandable. second solution requires more time to got it, but seems easier for novices that are

[Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Jón Fairbairn
Andrea Rossato [EMAIL PROTECTED] writes: On Mon, Sep 18, 2006 at 12:42:59PM +0100, Jón Fairbairn wrote: And if you do that, you can write it like this: subst e l' = concat . map subst_elem where subst_elem x | x == e = l' |

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Neil Mitchell
Hi subst e l' = concat.map (\x-if x==e then l' else [x]) subst e l' = concatMap (\x-if x==e then l' else [x]) Let's save an extra character :) Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Joachim Breitner
Hi, Am Montag, den 18.09.2006, 16:00 +0100 schrieb Neil Mitchell: subst e l' = concat.map (\x-if x==e then l' else [x]) subst e l' = concatMap (\x-if x==e then l' else [x]) Let's save an extra character :) We are talking keystrokes here, so count the shift key! Greetings, Joachim -- Joachim

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread wld
Hi, On 9/18/06, Joachim Breitner [EMAIL PROTECTED] wrote: Hi, Am Montag, den 18.09.2006, 16:00 +0100 schrieb Neil Mitchell: subst e l' = concat.map (\x-if x==e then l' else [x]) subst e l' = concatMap (\x-if x==e then l' else [x]) Let's save an extra character :) We are talking keystrokes

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Lennart Augustsson
Or even shorter: subst e l = concatMap $ \x-if x==e then l else [x] I kinda like the list comprehension version too subst e l1 l2 = [ r | x - l2, r - if x==e then l1 else [x] ] On Sep 18, 2006, at 10:54 , Jón Fairbairn wrote: Andrea Rossato [EMAIL PROTECTED] writes: On Mon, Sep 18, 2006

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Neil Mitchell
Hi, Out of curiosity, I've been developing a tool called Dr Haskell, for a sample run: module Test where substitute1 :: Eq a = a - [a] - [a] - [a] substitute1 e l1 l2= [c | c - check_elem l1] where check_elem [] = l1 check_elem (x:xs) = if x == e then

[Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Aaron Denney
On 2006-09-18, Jón Fairbairn [EMAIL PROTECTED] wrote: Andrea Rossato [EMAIL PROTECTED] writes: On Mon, Sep 18, 2006 at 12:42:59PM +0100, Jón Fairbairn wrote: And if you do that, you can write it like this: subst e l' = concat . map subst_elem where subst_elem x

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Sam Pointon
On 18/09/06, Aaron Denney [EMAIL PROTECTED] wrote: One has only a finite number of keystrokes before one's hands give out. Use them wisely. i agr rdndncy = bd shd b stmpd out wsts bndwth 2 Slightly more seriously, a few extra keystrokes can -really- improve clarity. For example, you can

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Andrea Rossato
On Mon, Sep 18, 2006 at 11:04:27AM -0400, Lennart Augustsson wrote: Or even shorter: subst e l = concatMap $ \x-if x==e then l else [x] I kinda like the list comprehension version too subst e l1 l2 = [ r | x - l2, r - if x==e then l1 else [x] ] This is the version I first wanted to (try

[Haskell-cafe] darcs get-together tuesday evening (2006-09-19 18:00)

2006-09-18 Thread Eric Y. Kow
Dear darcs users, hackers and observers (*), We're getting together around 18:00 this Tuesday to discuss and/or hack on darcs. This will be after the ICFP sessions for that day, in Portland, Oregon, specifically the Marriott downtown waterfront LL1. David Roundy will be there, Ian Lynagh and me

[Haskell-cafe] Re: foreach

2006-09-18 Thread Benjamin Franksen
Brandon Moore wrote: Couldn't '\' delimit a subexpression, as parentheses do? Would there be any ambiguity in accepting code like State \s - (s, s) instead of requiring State $ \s - (s, s), or taking main = do args - getArgs foreach args \arg - do foreach [1..3] \n - do putStrLn ((show

Re: [Haskell-cafe] foreach

2006-09-18 Thread Twan van Laarhoven
Couldn't '\' delimit a subexpression, as parentheses do? Would there be any ambiguity in accepting code like State \s - (s, s) instead of requiring State $ \s - (s, s), or taking Looking at the Haskell 98 language definition it seems that a whole class of these expressions are disallowed

Re: [Haskell-cafe] Re: Optimization problem

2006-09-18 Thread Ross Paterson
On Sun, Sep 17, 2006 at 01:08:04PM +0200, [EMAIL PROTECTED] wrote: Ross Paterson wrote: It's interesting that these composed transformations don't seem to cost too much. That the composed transformations are indeed cheap is not necessarily disturbing. I meant the composition of the

Re: [Haskell-cafe] Re: Optimization problem

2006-09-18 Thread Ross Paterson
On Mon, Sep 18, 2006 at 12:23:11AM +0100, Ross Paterson wrote: To prove that (even for partial and infinite lists ps) splitSeq ps = [(a, seconds a ps) | a - nub ps] [...] we can establish, by induction on the input list, (1) fst (splitSeq' s ps) = [(a, seconds a

[Haskell-cafe] Either e Monad

2006-09-18 Thread Deokhwan Kim
Dear all, Where is the Monad instance declaration of Either e? From the description of Control.Monad.Error, I deduce that Either e is an instance of Monad. http://haskell.org/ghc/docs/latest/html/libraries/mtl/Control-Monad-Error.html class Monad m = MonadError e m | m - e where ...