OPTIONS_GHC -auto-all

2006-12-02 Thread Serge D. Mechveliani
Dear GHC developers, Can you, please tell me how to add -prof -auto-all as dynamic option for a chosen source module? This is in ghc-6.6. I `make' my large program (of many modules) via Cabal, under -prof. The Main module contains the test example main. `main' calls for

difficult profiling example

2006-12-02 Thread Serge D. Mechveliani
Dear GHC developers, dear users, I am starting to doubt in the GHC time profiling. Why can advise, please, on the following example? This is important for me: I need to find who eats time in this particular example. This is for ghc-6.6. I `make' my large program (of many modules) via Cabal,

Re: Re: OpengGL lockup using GHC 6.6 on Intel Mac

2006-12-02 Thread Joe Jones
Yep, that works well. Thanx! On 12/1/06, Deborah Goldsmith [EMAIL PROTECTED] wrote: I can get this to work if I compile it with ghc, rather than try to run it with ghci or hugs. ghc --make Alpha3D.hs ./Alpha3D works fine with no hangs. Deborah On Dec 1, 2006, at 6:49 PM, Deborah Goldsmith

RE: bang patterns give fundamentally new capabilities?

2006-12-02 Thread Simon Peyton-Jones
| I was recently presented with the problem of writing a function like so | | seqInt__ :: forall a . a - Int# - Int# | seqInt__ x y = x `seq` y | | which seems fine, except 'seq' of type forall a b . a - b - b cannot | be applied to an unboxed value. Actually it works fine. Did you try it? Seq

Building GHC quickly

2006-12-02 Thread Donald Bruce Stewart
Had a go today building GHC on a multcore linux box, with -j, just to see how fast it would go. Summary: you can build GHC from scratch in less than 10 minutes these days! More details here: http://cgi.cse.unsw.edu.au/~dons/blog/2006/12/03#build_ghc_fast -- Don

[Haskell] Help needed interrupting accepting a network connection

2006-12-02 Thread Cat Dancer
I'd like to write a server accepting incoming network connections that can be gracefully shutdown. When the server is asked to shutdown, it should stop accepting new connections, finish processing any current connections, and then terminate. Clients can retry if they attempt to make a

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-02 Thread Chris Kuklewicz
Hi, I have taken a crack at this. The best thing would be not to use the asynchronous exceptions to signal the thread that calls accept. And use STM more, since the exception semantics are much easier to get right. But a few minor changes gets closer to what you want. First, the main problem

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-02 Thread Cat Dancer
On 12/2/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Hi, I have taken a crack at this. The best thing would be not to use the asynchronous exceptions to signal the thread that calls accept. I'd certainly be most happy not to use asynchronous exceptions as the signalling mechanism, but how

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-02 Thread Chris Kuklewicz
Cat Dancer wrote: On 12/2/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Hi, I have taken a crack at this. The best thing would be not to use the asynchronous exceptions to signal the thread that calls accept. I'd certainly be most happy not to use asynchronous exceptions as the signalling

[Haskell] ANNOUNCE: Another Haskell MIME Library

2006-12-02 Thread Jeremy Shaw
Hello, I would like to announce the availability of my partially complete MIME processing library. This library is supposed to be able to parse emails and decode various attachments, and generate emails with attachments. The library includes modules that implement portions of: RFC 2045 -

Re: [Haskell] ANNOUNCE: Another Haskell MIME Library

2006-12-02 Thread Taral
On 12/2/06, Jeremy Shaw [EMAIL PROTECTED] wrote: In any case, I wanted to release this library now since I know other people are already duplicating some (all?) of the work :) I am quite happy to accept patches. If someone else has a better code base already, I am happy to jump ship and work on

Re: [Haskell] ANNOUNCE: Another Haskell MIME Library

2006-12-02 Thread Donald Bruce Stewart
taralx: On 12/2/06, Jeremy Shaw [EMAIL PROTECTED] wrote: In any case, I wanted to release this library now since I know other people are already duplicating some (all?) of the work :) I am quite happy to accept patches. If someone else has a better code base already, I am happy to jump ship

Re: Standard (core) libraries initiative: rationale

2006-12-02 Thread Gabriel Dos Reis
Laurent Deniau [EMAIL PROTECTED] writes: [...] | About the libraries, I should say that I was a bit disappointed by the | common use of the terms genericity and polymorphism (even in | books). For example I have read many times that length is | polymorphic or generic while it only computes the

Re: character literal question

2006-12-02 Thread Iavor Diatchki
Hello, It does actually make syntax hilighting more complex, and introduces another special case. How is that another special case? If anything, it seems to be removing a special case because there is no need for an escape of the form \'. Do you have a concrete example of what it complicates?

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: Visual Haskell prerelease 0.2

2006-12-02 Thread shelarcy
Good. That new .dll works, too. Best Regards, On Sat, 02 Dec 2006 16:13:01 +0900, Krasimir Angelov [EMAIL PROTECTED] wrote: Sorry. I was sleeping and I uploaded it to darcs.haskell.org instead to haskell.org. Try it now. On 12/2/06, shelarcy [EMAIL PROTECTED] wrote: On Sat, 02 Dec 2006

[Haskell-cafe] Re: Generate 50 random coordinates

2006-12-02 Thread apfelmus
Huazhi (Hank) Gong wrote: Hello,all My intention is to generate 50 random coordinates like (x,y). myrand :: Int myrand = randomRIO(1::Int, 100) rf=[(myrand, myrand) | a - [1..50]] My short program is like this. However, GHCI say that the return type of randomRIO is IO a while the

[Haskell-cafe] Strange type behavior in GHCi 6.4.2

2006-12-02 Thread Grady Lemoine
Hello, I've been playing around with Dan Piponi's work on automatic differentiation (from http://sigfpe.blogspot.com/2005/07/automatic-differentiation.html and http://sigfpe.blogspot.com/2006/09/practical-synthetic-differential.html) and I'm getting some odd behavior with the inferred types of

Re: [Haskell-cafe] Strange type behavior in GHCi 6.4.2

2006-12-02 Thread Chris Kuklewicz
Grady Lemoine wrote: Hello, I've been playing around with Dan Piponi's work on automatic differentiation (from http://sigfpe.blogspot.com/2005/07/automatic-differentiation.html and http://sigfpe.blogspot.com/2006/09/practical-synthetic-differential.html) and I'm getting some odd behavior

Re: [Haskell-cafe] Strange type behavior in GHCi 6.4.2

2006-12-02 Thread Brian Hulley
Grady Lemoine wrote: f x = x^3 f' = snd . (evalDeriv f) When I load this in GHCi, I get: *Main :t f f :: (Num a) = a - a *Main :t snd . (evalDeriv f) snd . (evalDeriv f) :: (Num a, Num (Dual a)) = a - a *Main :t f' f' :: Integer - Integer Why is the type of f' Integer - Integer,

Re: [Haskell-cafe] Functional GUI combinators for arbitrary graphs ofcomponents?

2006-12-02 Thread Paul Hudak
If you consider just Dags, I believe that this question is equivalent to asking what set of combinators will allow you to create an arbitrary composition of functions that allow sharing inputs and returning multiple results. And I think that one answer to that is the set of combinators that

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

2006-12-02 Thread Donald Bruce Stewart
apfelmus: Duncan Coutts wrote: On Wed, 2006-11-29 at 20:27 +0100, [EMAIL PROTECTED] wrote: On the implementation level, lazy evaluation is in the way when crunching bytes. Something I rather enjoyed when hacking on the ByteString lib is finding that actually lazy evaluation is