Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-05 Thread Andrew Coppin
On 04/10/2011 07:08 AM, Dominique Devriese wrote: All, In case anyone is interested, I just want to point out an interesting article about the relation between Haskell type classes and C++ (overloading + concepts): http://sms.cs.chalmers.se/publications/papers/2008-WGP.pdf Dominique Thanks

[Haskell-cafe] Haddocok in Haskell Platform 2011.2.0.1?

2011-10-05 Thread .
Hi, I just installed a new computer, downloaded ghc 7.0.3 and HP 2011.2.0.1 from http://hackage.haskell.org/platform/linux.html as proposed there, and I can not install haddock. It says it requires ghc =7.2 and =7.4. Is that intended? Cheers, Christian

Re: [Haskell-cafe] Haddocok in Haskell Platform 2011.2.0.1?

2011-10-05 Thread Ivan Lazar Miljenovic
On 5 October 2011 18:09, . ch.go...@googlemail.com wrote: Hi, I just installed a new computer, downloaded ghc 7.0.3 and HP 2011.2.0.1 from http://hackage.haskell.org/platform/linux.html as proposed there, and I can not install haddock. It says it requires ghc =7.2 and =7.4. Is that intended?

Re: [Haskell-cafe] Haddocok in Haskell Platform 2011.2.0.1?

2011-10-05 Thread .
Thanks for the hint! It works with 2.9.2, I was just wondering .. if someone does a cabal update and e.g. a cabal install leksah, it wants to install haddock 2.9.4 (at least that was the case on my computer). However, that does not work, so unless you install 2.9.2 by hand first, you can not use

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-05 Thread Alberto G. Corona
If a newbie considers this as something natural, this is another reason for syntactic sugaring of HList: http://www.haskell.org/pipermail/haskell-cafe/2011-April/090986.html 2011/10/2 Du Xi sdiy...@sjtu.edu.cn --I tried to write such polymorphic function: expand (x,y,z) = (x,y,z) expand

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-05 Thread Felipe Almeida Lessa
On Wed, Oct 5, 2011 at 8:45 AM, Alberto G. Corona agocor...@gmail.com wrote: If a newbie considers this as something natural, this is another reason for syntactic sugaring of HList: http://www.haskell.org/pipermail/haskell-cafe/2011-April/090986.html Exposing newbies to HList seems like a

[Haskell-cafe] Munich Haskell Meeting

2011-10-05 Thread Heinrich Hördegen
Dear all, last Thursday's get-together for Haskell users in Munich was a success. About 12 people meet at Cafe Puck where we spent a nice evening. The overall opinion was, that gatherings of this kind should be held on a more regular basis. Therefore, I'd like to announce the following page:

[Haskell-cafe] Fwd: Is it possible to represent such polymorphism?

2011-10-05 Thread Alberto G. Corona
if Hlist is sugarized as variable length tuples, then the initial code would compile without noticing the use of HList... 2011/10/5 Felipe Almeida Lessa felipe.le...@gmail.com On Wed, Oct 5, 2011 at 8:45 AM, Alberto G. Corona agocor...@gmail.com wrote: If a newbie considers this as

[Haskell-cafe] categories in Haskell and module names

2011-10-05 Thread Roman Beslik
Hello. IMHO there are 2 ways to define categories in Haskell: W0) the category of types and functions (base.Data.Functor and company belongs to it); W1) the class base.Control.Category.Category. (Defining a category where the class of objects is a type seems impossible in Haskell.) But

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-05 Thread Vinod Grover
On the general notion of continuations, I believe Matt Might's blog explains it quite well using Javascript. http://matt.might.net/articles/by-example-continuation-passing-style/ In the way of a simple example, he suggests that instead of writing function id(x) { return x ; } a CPS version

[Haskell-cafe] what happens to ()'s from Core?

2011-10-05 Thread John Lato
Hello, I'm working on a small EDSL, and I think I've finally managed to get GHC to compile it to good core. Basically, it allows for the creation of expressions like: g = 0.5*x + 0.1*y which is then compiled to a tuple (related work: CCA, stream fusion) exists s. (s, s - Double -

Re: [Haskell-cafe] Cabal rebuilding all of the C++ code for wxHaskell

2011-10-05 Thread Dave Tapley
On 30 September 2011 03:02, Claude Heiland-Allen cla...@goto10.org wrote: On 30/09/11 02:45, DukeDave wrote: 1. Is there some reason (other than 'safety') that cabal install cleans everything up? As far as I've experienced and understand it, it doesn't - it's more that GHC can detect when

[Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Tom Thorne
I am having some strange performance issues when using SMP parallelism, that I think may be something to do with GC. Apologies for the large readouts below but I'm not familiar enough to know what is and isn't relevant! I have a pure function that is mapped over a list of around 10 values, and

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Ryan Newton
Hi Tom, I think debugging this sort of problem is exactly what we need to be doing (and making easier). Have you tried Duncan's newest version of Threadscope by the way? It looks like -- completely aside from the GC time -- this program is not scaling. The mutator time itself, disregarding GC,

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Ketil Malde
I don't know if this is relevant to your problems, but I'm currently struggling to get some performance out of a parallel - or rather, concurrent - program. Basically, the initial thread parses some data into an IntMap, and then multiple threads access this read-only to do the Real Work. Now,

Re: [Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.

2011-10-05 Thread Vincent Hanquez
On 10/04/2011 11:07 PM, Jason Dagit wrote: On Tue, Oct 4, 2011 at 2:15 PM, Vincent Hanquezt...@snarc.org wrote: Any comments welcome, Nice! Have you looked at Petr Rockai's hashed-storage? http://hackage.haskell.org/package/hashed-storage-0.5.8 i heard about it before, but i don't know

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Edward Z. Yang
Ketil, For your particular problem, unevaluated thunks should be easy to check: dump a heap profile and look for a decreasing allocation of thunks. That being said, IntMap is spine strict, so that will all be evaluated, and if your threads are accessing disjoint keys there should be no

Re: [Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.

2011-10-05 Thread Vincent Hanquez
On 10/05/2011 01:58 AM, Conrad Parker wrote: Hi Vincent, great stuff! I've also got an in-progress toy git clone called ght: http://github.com/kfish/ght. It only reads, no write support and no revspec parsing. I tried to keep close to the git design, using mmap and Ptr-based binary search to

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Tom Thorne
Thanks for the reply, I haven't actually tried threadscope yet, I will have a look at that tomorrow at some point. I also had no idea you could use valgrind on haskell programs, so I will look into that as well. I think the program certainly does have problems scaling, since I made a very basic

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Johan Tibell
On Wed, Oct 5, 2011 at 2:37 PM, Tom Thorne thomas.thorn...@gmail.comwrote: The only problem is that now I am getting random occasional segmentation faults that I was not been getting before, and once got a message saying: Main: schedule: re-entered unsafely Perhaps a 'foreign import unsafe'

[Haskell-cafe] Haskell Weekly News: Issue 202

2011-10-05 Thread Daniel Santa Cruz
Welcome to issue 202 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of September 25 to October 1, 2011. New and Updated Projects * ParserFunction (Enzo Fabrizio; 0.0.5) Provides utilities for parsing and evaluating mathematical