[Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-12 Thread Heinrich Apfelmus
Ivan Lazar Miljenovic wrote: Heinrich Apfelmus writes: I'm not sure what the right solution is, but I think it definitely involves catering for different node types. For instance, the library could operate on a type newtype Graph node a b = Graph (Gr a b, Data.Map.Map Int node) or it

[Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-12 Thread Heinrich Apfelmus
Henning Thielemann wrote: Ivan Miljenovic wrote: You're splitting apart related data into _three_ different data structures (the graph, vertex labels and edge labels)? _That_ doesn't make sense. There are no edge labels, only vertex labels. And yes, I find separation of data

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-12 Thread Ivan Lazar Miljenovic
Heinrich Apfelmus apfel...@quantentunnel.de writes: Ivan Lazar Miljenovic wrote: As I said, we're considering using an Associated Type to let users choose what type they want to use (probably with a default Map instance for this). However, we'd recommend/push the Int-based one. For my

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-12 Thread Ivan Lazar Miljenovic
Heinrich Apfelmus apfel...@quantentunnel.de writes: It appears to me that the concerns of labels and vertexes are not separate enough. After all, the point is that they have to be kept in sync. Keeping them in sync should be the business of the graph library, not of the user. It doesn't have

[Haskell-cafe] Re: tweak vacuum-* output

2010-05-12 Thread Gleb Alexeyev
Ozgur Akgun wrote: Hi all, I am using vacuum-opengl and vacuum-ubigraph to visualise and analyse some of my data structures. They are quite helpful most of the time, however sometimes I feel the need to tweak the generated output -- such as removing the auto-generted identifiers from

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-12 Thread Andrea Vezzosi
On Wed, May 12, 2010 at 7:50 AM, wren ng thornton w...@freegeek.org wrote: wren ng thornton wrote: Here's one big difference: newtype ErrCPS e m a = ErrCPS { runErrCPS ::    forall r . (e - m r) --  error handler    - (a - m r) --  success handler    - m r } The analogous version I use

[Haskell-cafe] Re: hSetEncoding on socket handles

2010-05-12 Thread Simon Marlow
On 12/05/2010 01:56, David Powell wrote: Greetings, I am having trouble sending unicode characters as utf8 over a socket handle. Despite setting the encoding on the socket handle to utf8, it still seems to use some other encoding when writing to the socket. It works correctly when writing to

[Haskell-cafe] ghc api renamed source

2010-05-12 Thread Phyx
Hi all, I was wondering if it's possible to get to the renamed source before actually typechecking, I currently have parsed - parse modName checked - typecheckModule parsed let renamed = tm_renamed_source checked value = tm_typechecked_source checked

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-12 Thread Antoine Latter
On Tue, May 11, 2010 at 8:28 PM, wren ng thornton w...@freegeek.org wrote: Max Cantor wrote: Based on some discussions in #haskell, it seemed to be a consensus that using a modified continuation monad for Error handling instead of Eithers would be a significant optimization since it would

Re: [Haskell-cafe] ghc api renamed source

2010-05-12 Thread Thomas Schilling
The difficulty is that renamer and type-checker are mutually recursive because of Template Haskell. I've been looking into this a while ago and I have a basic idea how a better API could look like, but I haven't sorted out the details. One very hacky workaround -- and I'm not sure whether it can

[Haskell-cafe] ANN: Monad.Reader Issue 16

2010-05-12 Thread Brent Yorgey
I am very pleased to announce that Issue 16 of The Monad.Reader is now available [1]. Issue 16 consists of the following three articles: * Demand More of Your Automata by Aran Donohue * Iteratee: Teaching an Old Fold New Tricks by John W. Lato * Playing with Priority Queues by Louis

[Haskell-cafe] Why is TChan GHC specific?

2010-05-12 Thread Edward Amsden
I'm currently just getting into playing around with concurrency in haskell, primarily because I find STM intriguing. In looking through the docs I noticed that the transactional channels are GHC specific.

Re: [Haskell-cafe] Why is TChan GHC specific?

2010-05-12 Thread Peter Robinson
As far as I know, TChan needs the 'retry' combinator which requires GHC's RTS. Same is true for TMVar, I think. Peter On 12 May 2010 21:15, Edward Amsden eca7...@cs.rit.edu wrote: I'm currently just getting into playing around with concurrency in haskell, primarily because I find STM

[Haskell-cafe] corner case in Text.JSON 0.4.3

2010-05-12 Thread Martin Hilbig
hi, since i got no answer from the maintainer, maybe someone else can take care of it, or at least point out, what i did wrong. so, i recently stumbled upon some error while using Text.JSON 0.4.3 [1]: Text/JSON/String.hs:(127,4)-(137,49): Non-exhaustive patterns in case indeed ghc warned:

Re: [Haskell-cafe] corner case in Text.JSON 0.4.3

2010-05-12 Thread Iavor Diatchki
Hi, I think it was probably I who wrote this, so I'll take the blame :-) It seems like a genuine bug, where we are not checking for strings that are not terminated. Thanks for spotting it, and also for the patch! I'll try to update the package soon. -Iavor On Wed, May 12, 2010 at 12:53 PM,

[Haskell-cafe] Re: [Haskell] ANN: Monad.Reader Issue 16

2010-05-12 Thread Edward Kmett
On Wed, May 12, 2010 at 2:12 PM, Brent Yorgey byor...@seas.upenn.eduwrote: I am very pleased to announce that Issue 16 of The Monad.Reader is now available [1]. Issue 16 consists of the following three articles: * Demand More of Your Automata by Aran Donohue * Iteratee: Teaching an

Re: [Haskell-cafe] corner case in Text.JSON 0.4.3

2010-05-12 Thread Daniel Fischer
On Wednesday 12 May 2010 21:53:41, Martin Hilbig wrote: hi, since i got no answer from the maintainer, maybe someone else can take care of it, or at least point out, what i did wrong. so, i recently stumbled upon some error while using Text.JSON 0.4.3 [1]:

Re: [Haskell-cafe] corner case in Text.JSON 0.4.3

2010-05-12 Thread Iavor Diatchki
Hi, it seems that this was already fixed in the repo, I've put a new version (0.4.4) on hackage. Thanks, again, for spotting this! -Iavor On Wed, May 12, 2010 at 1:24 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: On Wednesday 12 May 2010 21:53:41, Martin Hilbig wrote: hi, since i got no

Re: [Haskell-cafe] Re: tweak vacuum-* output

2010-05-12 Thread Ozgur Akgun
Thanks for the answer. I see your point, that Ubigraph does some magic* to place vertices and edges. This makes me wonder, how they generate the binary tree demo: http://ubietylab.net/ubigraph/content/Demos/random_binary_tree.html Is there a way to disable this optimal graph layout determination

Re: [Haskell-cafe] ANN: Monad.Reader Issue 16

2010-05-12 Thread Richard O'Keefe
On May 13, 2010, at 6:12 AM, Brent Yorgey wrote: I am very pleased to announce that Issue 16 of The Monad.Reader is now available [1]. I am very pleased to receive it, and deeply grateful to John Lato for his Iteratee article. Many thanks!

Re: [Haskell-cafe] ANN: Monad.Reader Issue 16

2010-05-12 Thread Edward Z. Yang
Excerpts from Brent Yorgey's message of Wed May 12 14:12:53 -0400 2010: I am very pleased to announce that Issue 16 of The Monad.Reader is now available [1]. Excellent news! Looking forward to reading. Cheers, Edward ___ Haskell-Cafe mailing list

[Haskell-cafe] debugging a hanging program: where to start?

2010-05-12 Thread Aran Donohue
Hi Cafe, I have a program that I can reliably cause to hang. It's concurrent using STM, so I think it could be a deadlock or related issue. I also do some IO, so I think it could be blocking in a system call. It only hangs when compiled with -threaded. I tried building with -prof, and running

Re: [Haskell-cafe] debugging a hanging program: where to start?

2010-05-12 Thread Jason Dagit
On Wed, May 12, 2010 at 8:15 PM, Aran Donohue aran.dono...@gmail.comwrote: Hi Cafe, I have a program that I can reliably cause to hang. It's concurrent using STM, so I think it could be a deadlock or related issue. I also do some IO, so I think it could be blocking in a system call. It only

Re: [Haskell-cafe] ANN: Monad.Reader Issue 16

2010-05-12 Thread David Leimbach
On Wed, May 12, 2010 at 7:24 PM, Edward Z. Yang ezy...@mit.edu wrote: Excerpts from Brent Yorgey's message of Wed May 12 14:12:53 -0400 2010: I am very pleased to announce that Issue 16 of The Monad.Reader is now available [1]. Excellent news! Looking forward to reading. I'm trying the

Re: [Haskell-cafe] corner case in Text.JSON 0.4.3

2010-05-12 Thread Don Stewart
martin: hi, since i got no answer from the maintainer, maybe someone else can take care of it, or at least point out, what i did wrong. so, i recently stumbled upon some error while using Text.JSON 0.4.3 [1]: Text/JSON/String.hs:(127,4)-(137,49): Non-exhaustive patterns in case