Re: runghc printing result of main when main is not IO ()

2007-08-30 Thread Tomasz Zielonka
On Thu, Aug 30, 2007 at 08:33:37AM +0100, Simon Marlow wrote: Tomasz Zielonka wrote: Hello! Consider: $ cat R.hs main = return [()] $ runghc R.hs [()] This was a bit surprising for me, because I thought that runghc mimics the way a compiled program behaves. This doesn't happen with 6.6.1

runghc printing result of main when main is not IO ()

2007-08-29 Thread Tomasz Zielonka
Hello! Consider: $ cat R.hs main = return [()] $ runghc R.hs [()] This was a bit surprising for me, because I thought that runghc mimics the way a compiled program behaves. Best regards Tomek ___ Glasgow-haskell-bugs mailing list

Re: Vote for GHC 6.8 bugs!

2007-07-03 Thread Tomasz Zielonka
On Tue, Jul 03, 2007 at 09:28:35AM +0100, Simon Peyton-Jones wrote: We have just instituted a cheap-and-cheerful mechanism for voting. Each bug has a 'cc' field. To vote, just add your email address to the cc field! How should we separate email addresses? Right now people use different

Tell GHC HQ if you'd like this to unify the context

2007-05-08 Thread Tomasz Zielonka
Hello! I've got such a compilation error on code that was accepted by an earlier GHC: Expr/Names.hs:19:66: GADT pattern match in non-rigid context for `TypeInt' Tell GHC HQ if you'd like this to unify the context In the pattern: TypeInt In the pattern:

Re: ghci value printing

2007-04-27 Thread Tomasz Zielonka
On Fri, Apr 27, 2007 at 03:22:26PM +0100, Frederik Eaton wrote: I like the new printing behaviour for (a1), but not for (b1). How do I bind a variable to the result of an IO action without printing that variable? It seems that the value is not printed when there are more than one pattern

Re: Bogus stats when running SMP programs

2006-09-29 Thread Tomasz Zielonka
On Thu, Sep 28, 2006 at 12:42:50PM +0100, Ian Lynagh wrote: On Thu, Sep 28, 2006 at 09:07:33AM +0200, Tomasz Zielonka wrote: Great! Which snapshot can I use to test this change? Tonight's or later - there isn't one yet. As I wrote in another message to glasgow-haskell-bugs, there are some

Re: Broken snapshot archives

2006-09-29 Thread Tomasz Zielonka
On Fri, Sep 29, 2006 at 12:30:10PM +0100, Simon Marlow wrote: Tomasz Zielonka wrote: Some recent GHC snapshot files seem to be broken. Yes, this is due to a long-standing problem with our firewalls that sometimes cause corruption of an SSH connection. I'll try to make it retry or delete

Re: Bogus stats when running SMP programs

2006-09-29 Thread Tomasz Zielonka
On Fri, Sep 29, 2006 at 11:00:25AM +0200, Tomasz Zielonka wrote: I will compile GHC from sources now. The stats seem to be OK now. Thanks! Best regards Tomasz ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http

Re: Bogus stats when running SMP programs

2006-09-28 Thread Tomasz Zielonka
On Thu, Sep 28, 2006 at 01:57:18AM +0100, Ian Lynagh wrote: I've found a machine which had the same problem. I think I've fixed it with Thu Sep 28 00:46:30 BST 2006 Ian Lynagh [EMAIL PROTECTED] * Handle clock_gettime failing Great! Which snapshot can I use to test this change? Best

Broken snapshot archives

2006-09-28 Thread Tomasz Zielonka
Hello! Some recent GHC snapshot files seem to be broken. For example with http://www.haskell.org/ghc/dist/current/dist/ghc-6.5.20060927-i386-unknown-linux.tar.bz2 I get: $ tar jxf ghc-6.5.20060927-i386-unknown-linux.tar.bz2 bzip2: Compressed file ends unexpectedly; perhaps it is

Re: Bogus stats when running SMP programs

2006-09-27 Thread Tomasz Zielonka
On Wed, Sep 27, 2006 at 09:25:39AM +0100, Simon Marlow wrote: Perhaps clock_gettime() is returning strange results on your system. Could you try compiling with -threaded -debug, and run the program under gdb. When I compile with -threaded -debug, the stats are OK :-/ Best regards Tomasz

Re: Bogus stats when running SMP programs

2006-09-27 Thread Tomasz Zielonka
On Wed, Sep 27, 2006 at 12:06:34PM +0100, Simon Marlow wrote: When I compile with -threaded -debug, the stats are OK :-/ Ok, maybe try strace? Nothing suspicious, at least for me. Strace logs attached. I'll try to compile GHC from sources and put some debugging prints in the RTS. There

Bogus stats when running SMP programs

2006-09-21 Thread Tomasz Zielonka
Hello! I am getting nonsensical execution statistics (+RTS -Sstderr) when running programs in SMP mode (+RTS -N2). Example: Task 0 (worker) : MUT time: 401572821.14s ( 21.89s elapsed) GC time: 0.00s ( 0.00s elapsed) Task 1 (worker) : MUT time: 296.00s (

Re: weird data corruption

2006-08-24 Thread Tomasz Zielonka
On Thu, Aug 24, 2006 at 01:12:32AM +0100, Frederik Eaton wrote: Do you think that the standard GHC behavior should be for multithreaded programs to produce garbage on stderr? IIUC, even if you switch to LineBuffering on stderr, you'll still get garbage, only less often and in more subtle ways,

Re: Space leak

2005-12-27 Thread Tomasz Zielonka
On Tue, Dec 27, 2005 at 08:12:20PM +0100, Christian Maeder wrote: Already the following bit exhibits unexpected memory consumption: main = mapM_ print $ take (n * 5) $ drop (n * 3) [1..] n = 10 Dropping the elements is more expensive than printing them. Somehow the dropped elements

Re: [GHC] #638: Patch to make Control.Monad.replicateM_ faster

2005-12-17 Thread Tomasz Zielonka
On Sat, Dec 17, 2005 at 05:26:33PM +0100, Tomasz Zielonka wrote: Are you sure it is really more efficient? I remember that I was amazed that GHC compiled my (sequence_ $ repeat $ ...) code to a really tight loop with no allocations. Hmmm... perhaps no allocations is not surprising

Re: [GHC] #638: Patch to make Control.Monad.replicateM_ faster

2005-12-17 Thread Tomasz Zielonka
On Sat, Dec 17, 2005 at 03:58:19PM -, GHC wrote: #638: Patch to make Control.Monad.replicateM_ faster --+- Reporter: ekarttun@cs.helsinki.fi | Owner: Type: task |

Re: [Haskell-cafe] Project postmortem

2005-12-02 Thread Tomasz Zielonka
On Fri, Dec 02, 2005 at 11:20:54AM -, Simon Marlow wrote: If anyone is interested, this turned out to be a bug in the Network.BSD module, namely that getHostByName isn't thread safe because it is based on the C library function gethostbyname(), which returns data in a single static area.

Re: [Haskell-cafe] Project postmortem

2005-12-02 Thread Tomasz Zielonka
On Fri, Dec 02, 2005 at 12:39:25PM -, Simon Marlow wrote: Do I understand correctly that another workaround is - don't compile your programs with -threaded ? No, the bug isn't related to -threaded. It still occurs without -threaded. Let's check that now I understand - so the

Re: [Haskell-cafe] mistake in Gentle Introduction

2005-09-22 Thread Tomasz Zielonka
On 9/22/05, Simon Marlow [EMAIL PROTECTED] wrote: On 22 September 2005 10:05, Christian Maeder wrote: The error message on this is really poor: parse error on input `length' An addition like expecting '(' might be more helpful. Not easy to do - some significant work on Happy would be required

Re: stdin set to nonblocking mode

2005-08-12 Thread Tomasz Zielonka
On Fri, Aug 12, 2005 at 07:43:56AM -0700, John Meacham wrote: Hmm, care to give some details as to why you equate can with always will on all platforms? Yes. this is guarenteed behavior on pretty much every system. A whole lot of things would break if it were otherwise. if select says a

Re: the impossible happened

2005-05-23 Thread Tomasz Zielonka
On Mon, May 23, 2005 at 09:38:58AM +0100, Simon Peyton-Jones wrote: This fromJust bug is SourceForge 1177320. The trouble is that we've been unable to reproduce it here. It seems to show up when compiling some large thing, like Darcs or WASH. If anyone would be willing to snapshot a tree

Unused variable warnings when deriving (Data)

2005-04-27 Thread Tomasz Zielonka
Hello! When I compile the following module with ghc -W -c A.hs I see several unnecessary warning messages: $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.4 $ ghc -no-recomp -W -c A.hs no location info: Warning: Defined but not used: `k' no location info: Warning:

Re: environment variables for ghc

2005-03-09 Thread Tomasz Zielonka
On Wed, Mar 09, 2005 at 10:01:40AM -0800, Frederik Eaton wrote: On Wed, Mar 09, 2005 at 05:19:18PM -, Simon Marlow wrote: On 09 March 2005 08:29, Frederik Eaton wrote: Oh, is that the only reason? That's a terrible reason to not have a feature. :) You could just write a 'ghcbug' script

Re: environment variables for ghc

2005-03-09 Thread Tomasz Zielonka
On Wed, Mar 09, 2005 at 11:55:11AM -0800, Frederik Eaton wrote: I am still not convinced that it is a good idea to add such functionality to GHC. Do you want to persuade developers of every program you use to add similar feature? Is the perceived difficulty of that task an argument

Re: environment variables for ghc

2005-03-09 Thread Tomasz Zielonka
On Wed, Mar 09, 2005 at 01:12:49PM -0800, Frederik Eaton wrote: Are you volunteering to be that person? ;-) Are you saying that a patch would be accepted? I am not the one to decide. Best regards Tomasz ___ Glasgow-haskell-bugs mailing list

Buglet in :info (ghc 6.2.2)

2004-12-07 Thread Tomasz Zielonka
Hello, This happens in GHC 6.2.2: Prelude let lf $$$ lx = zipWith ($) lf lx Prelude :i $$$ -- $$$ is a variable, defined at interactive:1 ($$$) :: forall b b. [b - b] - [b] - [b] Prelude :t ($$$) ($$$) :: forall b b1. [b1 - b] - [b1] - [b] Note the difference in types presented by :info and

Re: SegFault caused by some IO+Arrays+GC interaction

2004-06-28 Thread Tomasz Zielonka
On Mon, Jun 28, 2004 at 12:07:32PM +0100, Simon Marlow wrote: Thanks for a superb bug report. This bug appears to be another incarnation of a bug that has been fixed since 6.2.1. I used the 6.2.1 compiler but linked the program against the latest runtime on the 6.2 branch, which is identical

Re: SegFault caused by some IO+Arrays+GC interaction

2004-06-28 Thread Tomasz Zielonka
On Mon, Jun 28, 2004 at 01:38:42PM +0200, Tomasz Zielonka wrote: On Mon, Jun 28, 2004 at 12:07:32PM +0100, Simon Marlow wrote: So you can either wait for 6.2.2 (shouldn't be too long), use a nightly snapshot of the 6.2 branch, or build from source. Or if you have an existing 6.2.1 build

SegFault caused by some IO+Arrays+GC interaction

2004-06-27 Thread Tomasz Zielonka
Hello! The attached program uses no unsafe operations and yet it segfaults from time to time. Try it on some file of moderate size, like: $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.2.1 $ ghc -O --make Bug -o Bug Chasing modules from: Bug Compiling Main

Re: ghc-6.2 bug in type inference

2004-02-06 Thread Tomasz Zielonka
On Fri, Feb 06, 2004 at 11:13:57AM +, Malcolm Wallace wrote: * -fglasgow-exts makes perfectly reasonable Haskell'98 code invalid, throws up a totally misleading error unrelated to the cause of the problem, and gives no clue as to what particular extension is

Re: hGetBuf (or something related) broken for 6.2 with sockets

2003-12-19 Thread Tomasz Zielonka
On Thu, Dec 18, 2003 at 09:53:50PM +0100, Tomasz Zielonka wrote: On Thu, Dec 18, 2003 at 07:44:58PM +0100, George Russell wrote: It seems to work when I change hGetBuf to hGetBufNonBlocking. The name is a bit misleading - the action _does_ wait for some data, but it doesn't wait for all

Re: hGetBuf (or something related) broken for 6.2 with sockets

2003-12-19 Thread Tomasz Zielonka
On Fri, Dec 19, 2003 at 10:26:02AM -, Simon Marlow wrote: On Thu, Dec 18, 2003 at 09:53:50PM +0100, Tomasz Zielonka wrote: On Thu, Dec 18, 2003 at 07:44:58PM +0100, George Russell wrote: It seems to work when I change hGetBuf to hGetBufNonBlocking. The name is a bit

Re: hGetBuf (or something related) broken for 6.2 with sockets

2003-12-19 Thread Tomasz Zielonka
On Fri, Dec 19, 2003 at 11:39:28AM +0100, Tomasz Zielonka wrote: Well, I think that it would be better if hGetBuf didn't block if all requested data was already in buffer, but I don't insist on it. However this change of semantics can brake existing programs. I am mixing things again

Re: hGetBuf (or something related) broken for 6.2 with sockets

2003-12-18 Thread Tomasz Zielonka
On Thu, Dec 18, 2003 at 07:44:58PM +0100, George Russell wrote: (b) The server module only gets part of the data. In fact for me it comes to a stop with [239][240][241][242][243Iterating despite there being more data to come. (And despite the fact that the client has done hFlush).

Re: bug with (##) operator and -fglasgow-exts, GHC 5.04, 6.0

2003-06-06 Thread Tomasz Zielonka
On Fri, Jun 06, 2003 at 08:00:00PM +1000, Bernard James POPE wrote: Hi all, I seem to remember reading about this before, but I can't find it, so I'm sorry if I'm repeating a known bug report. It seems that -fglasgow-exts has trouble with (##) as an operator: module Main where f

Re: higher-order typing errors

2003-01-23 Thread Tomasz Zielonka
Hi! On Thu, Jan 23, 2003 at 10:28:13AM -, Simon Peyton-Jones wrote: To get around it, define your own data type: data MyPr = MyPr (forall a.a-a) (forall a.a-a) swap1 :: MyPr - MyPr I played a bit with using highed order polymorphism for this problem, and have encountered

Bug in codeGen/CgRetConv.lhs

2003-01-15 Thread Tomasz Zielonka
Hello! GHC nicely asked me to report the bug, so here it goes :) Compiling this code in GHC 5.04.1 and 5.04.2 {-# OPTIONS -fglasgow-exts #-} module Bug where type T a = Int - (# Int, Int #) f :: T a - T a f t = \x - case t x of r - r brings the following error message:

Small bug in Data.PackedString.splitWithPS

2003-01-12 Thread Tomasz Zielonka
Hi! In GHC 5.04.2 this fails: wordsPS (packString a) Cause: typical off-by-one error in libraries/base/Data/PackedString.hs line 289 first_pos_that_satisfies pred ps len n = case [ m | m - [n..len], pred (ps ! m) ] of ^ here Probably