Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-11 Thread Yves Parès
Can GUI programming be liberated from the IO monad? From a layman's point of view, aren't structures like enumerators/iteratees more suited to deal with IO? Or maybe they just wouldn't apply in the case of GUI... 2011/7/8 Heinrich Apfelmus apfel...@quantentunnel.de Dear Haskellers, Can GUI

[Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread L Corbijn
Hello, I'm wondering why the trailing comma is allowed in export syntax, but not in record syntax, here an example module Foo ( export1, -- is allowed ) where data Type = Type { record1 :: Foo, -- is not allowed } To me this seems quite inconsistent and sometimes quite frustrating,

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Christopher Done
On 11 July 2011 10:49, L Corbijn aspergesoe...@gmail.com wrote: You could of course say that I'm using a bad style, but it remains that it seems to be inconsistent to allow a trailing comma in one place and not in the other. So is there an reason for this? I've also noticed that I can write

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Jack Henahan
Well, for your example frustration, the leading comma style would sort your problem nicely. As for the particulars… hmm, not sure. I use leading commas for both, so I never really noticed. It may be that since modules simply expose functions to other programs, the form is syntactically

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Sjoerd Visscher
On Jul 11, 2011, at 11:42 AM, Jack Henahan wrote: Well, for your example frustration, the leading comma style would sort your problem nicely. As for the particulars… hmm, not sure. I use leading commas for both, so I never really noticed. That just shifts the problem, I think? Now you can

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Johan Tibell
On Mon, Jul 11, 2011 at 11:51 AM, Sjoerd Visscher sjo...@w3future.com wrote: On Jul 11, 2011, at 11:42 AM, Jack Henahan wrote: Well, for your example frustration, the leading comma style would sort your problem nicely. As for the particulars… hmm, not sure. I use leading commas for both,

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Joachim Breitner
Hi, Am Montag, den 11.07.2011, 10:49 +0200 schrieb L Corbijn: You could of course say that I'm using a bad style, but it remains that it seems to be inconsistent to allow a trailing comma in one place and not in the other. So is there an reason for this? there is actually a bug report against

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Malcolm Wallace
That just shifts the problem, I think? Now you can no longer comment out the first line. If you are using to-end-of-line comments with --, then the likelihood of noticing a leading ( or { on the line being commented, is much greater than the likelihood of noticing a trailing comma on the

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Johan Tibell
On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann thunderb...@henning-thielemann.de wrote: Johan Tibell wrote: I've found this quite annoying, especially when using CPP to conditionally include something in a list, as it might force you to reorder the list to make the commas appear correctly

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Michael Orlitzky
On 07/10/11 15:37, Felipe Almeida Lessa wrote: You don't need to do it, it is already done =). See the pool package by Michael Snoyman on Hackage [1]. More specifically, see createPoolCheckAlive [2]. Cheers, [1] http://hackage.haskell.org/package/pool [2]

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Brandon Allbery
On Mon, Jul 11, 2011 at 11:27, Michael Orlitzky mich...@orlitzky.com wrote: How do people use this stuff? The README is empty, there's no documentation, and none of the functions are commented. I'm forced to conclude that there are people capable of looking at this, I can *almost* work it out

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Felipe Almeida Lessa
On Mon, Jul 11, 2011 at 12:27 PM, Michael Orlitzky mich...@orlitzky.com wrote: How do people use this stuff? The README is empty, there's no documentation, and none of the functions are commented. I'm forced to conclude that there are people capable of looking at this,  createPoolCheckAlive

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Ozgun Ataman
Have you looked at Bryan O'Sullivan's resource-pool[1] library? I've used it with MySQL, Redis and Riak connection pooling. It's been robust and easy to use. It seems like it would be a good fit for your application. Cheers, Ozgun [1] http://hackage.haskell.org/package/resource-pool On Sun,

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Michael Orlitzky
On 07/11/11 11:41, Felipe Almeida Lessa wrote: Yes, there's a documentation problem. But you can guess by the types =). IO a: opens a new resource a. a - IO (): disposes the given resource. Int: maximum number of open resources. Pool a - m b: the action you want to execute; after it

Re: [Haskell-cafe] IterIO: How to write use my inumReverse

2011-07-11 Thread Maciej Wos
Sorry, my previous message got truncated. I was trying to say that many iteratees like iterReverse can be defined nicely using combinators from Control.Applicative. You end up with much cleaner code. Also, iterLines doesn't work as the name would suggest. It only consumes one line from the input

[Haskell-cafe] Monad.Reader #19 call for copy -- special issue on parallelism and concurrency

2011-07-11 Thread Brent Yorgey
Call for Copy: The Monad.Reader - Issue 19 SPECIAL ISSUE on parallelism and concurrency Whether you're an established academic or have only just started learning Haskell, if you have something to say, please consider writing an article for The

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Henning Thielemann
On Mon, 11 Jul 2011, Johan Tibell wrote: On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann thunderb...@henning-thielemann.de wrote: Johan Tibell wrote: I've found this quite annoying, especially when using CPP to conditionally include something in a list, as it might force you to reorder

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Michael Snoyman
On Mon, Jul 11, 2011 at 6:27 PM, Michael Orlitzky mich...@orlitzky.com wrote: On 07/10/11 15:37, Felipe Almeida Lessa wrote: You don't need to do it, it is already done =).  See the pool package by Michael Snoyman on Hackage [1].  More specifically, see createPoolCheckAlive [2]. Cheers,

[Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Yitzchak Gale
Simon Marlow has announced[1] on the Haskell Libraries list that the Typeable class is changing. The standard way to create a Typeable instance is just to derive it. If you do that, you will not be affected by this change. But it seems that many packages create Typeable instances by explicitly

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Michael Orlitzky
On 07/11/11 13:49, Michael Snoyman wrote: Author of the package speaking. I agree, that's a problem :). I've just uploaded a new version[1] that is properly documented, though it will take a bit for Hackage to generates the Haddocks. As Brandon said, the reason this wasn't documented in the

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Bryan O'Sullivan
On Mon, Jul 11, 2011 at 10:49 AM, Michael Snoyman mich...@snoyman.comwrote: I did email Bryan about this a bit ago, but he didn't get back [...] Thanks for jogging my memory. I've released an updated version of resource-pool that drops the dependency on that package.

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread jutaro
I hope that typeRepKey is no longer in the IO monad (for the simple reason to teach me that the key can change between session). This forced me to use unsafePerformIO to make a typeable boxed type of instances of Ord an instance of Ord (to put it in a Map). Or did I miss something and I can do

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Thomas DuBuisson
On Mon, Jul 11, 2011 at 1:22 PM, jutaro j...@arcor.de wrote: I hope that typeRepKey is no longer in the IO monad (for the simple reason to teach me that the key can change between session). If it's implementation dependent then I see no reason for it to be in IO (this was mentioned on another

[Haskell-cafe] Fwd: The Typeable class is changing

2011-07-11 Thread Alberto G. Corona
What to do when the data has been defined in other package and provides no Typeable instance? 2011/7/11 Yitzchak Gale g...@sefer.org Simon Marlow has announced[1] on the Haskell Libraries list that the Typeable class is changing. The standard way to create a Typeable instance is just to

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Alistair Bayley
12 July 2011 05:49, Michael Snoyman mich...@snoyman.com wrote: As for Bryan's resource-pool: currently I would strongly recommend *against* using it for any purpose. It is based on MonadCatchIO-transformers[2], which is a subtly broken package. In particular, when I tried using it for

Re: [Haskell-cafe] Fwd: The Typeable class is changing

2011-07-11 Thread Thomas DuBuisson
Alberto G. Corona agocor...@gmail.com wrote: What to do when the data has been defined in other package and provides no Typeable instance? You'd have to use standalone deriving, which I hope gets into Haskell 201X. module A where data A = A {-# LANGUAGE StandaloneDeriving,

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Carl Howells
This will affect snap-core and heist, of the things I've provided Typeable instances for. In snap-core, deriving makes it use the internal module name, rather than the canonical location of the type. This causes issues with the Hint library, so it's worked around by using a manual instance of

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Gregory Crosswhite
On 7/11/11 11:18 AM, Yitzchak Gale wrote: The standard way to create a Typeable instance is just to derive it. If you do that, you will not be affected by this change. This is only the standard way if one is willing to sacrifice Haskell98 or Haskell2010 compatibility by using the

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-11 Thread Paul Liu
You guys might want to checkout the recent work on Euterpea at Yale CS. In particular: 1. Paul Hudak is writing a new book. http://plucky.cs.yale.edu/cs431/reading.htm 2. It uses FRP and arrows for sound synthesis. 3. It combines FRP signals with monadic (which recently gets re-written in arrows)

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-11 Thread Yves Parès
1. Paul Hudak is writing a new book. http://plucky.cs.yale.edu/cs431/reading.htm Wow... this is going to be my bedside reading. I haven't read the original Haskell School of Expression, did it use FRP back then? 2011/7/11 Paul Liu nine...@gmail.com You guys might want to checkout the recent

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Daniel Gorín
On Jul 11, 2011, at 10:48 PM, Alistair Bayley wrote: 12 July 2011 05:49, Michael Snoyman mich...@snoyman.com wrote: As for Bryan's resource-pool: currently I would strongly recommend *against* using it for any purpose. It is based on MonadCatchIO-transformers[2], which is a subtly broken

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-11 Thread Paul Liu
The original SOE had some FAL (functional animation) stuff, but I don't think it used specifically the word FRP. Certainly the concept of a first-class signal (behavior and event) was present. Regards, Paul Liu On Mon, Jul 11, 2011 at 3:22 PM, Yves Parès limestr...@gmail.com wrote: 1. Paul

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread dm-list-haskell-cafe
At Mon, 11 Jul 2011 21:18:30 +0300, Yitzchak Gale wrote: Please respond to this thread if you own a package that will be affected by this change. iterIO uses mkTyCon for the simple reason that ((Typeable t, Typeable m) = Iter t m) is Typeable1 and there is no automatic way of deriving