Re: [Haskell-cafe] Loading bitmap with xlib

2011-02-02 Thread Francesco Mazzoli
Conrad Parker conrad at metadecks.org writes: On 31 January 2011 21:40, Francesco Mazzoli f at mazzo.li wrote: Francesco Mazzoli f at mazzo.li writes: At the end I gave up and I wrote the function myself: http://hpaste.org/43464/readbitmapfile cool ... the listed maintainer for

Re: [Haskell-cafe] Instancing Typeable for monad transformers?

2011-02-02 Thread oleg
One can do something a bit shorter instance (Typeable a, Typeable1 m) = Typeable1 (Iteratee a m) where typeOf1 i = mkTyConApp (mkTyCon Data.Enumerator.Iteratee) [typeOf a, typeOf1 m] where (a,m) = peel i peel :: Iteratee a m w - (a, m ()) peel = undefined

[Haskell-cafe] ANN: HackageOneFive: Reverse dependency lookup for all packages on Hackage

2011-02-02 Thread Simon Hengel
Hello, I wrote a tiny Snap app that provides reverse dependency lookup for all packages on Hackage. A git repository is at: https://github.com/sol/HackageOneFive Setup instructions are provide in the README[1] file. It uses a PostgreSQL database for storage but it should be trivial to port

Re: [Haskell-cafe] ANN: HackageOneFive: Reverse dependency lookup for all packages on Hackage

2011-02-02 Thread Max Bolingbroke
On 2 February 2011 11:57, Simon Hengel simon.hen...@wiktory.org wrote: Hello, I wrote a tiny Snap app that provides reverse dependency lookup for all packages on Hackage. Are you familiar with Roel van Djik's revdep Hackage? http://bifunctor.homelinux.net/~roel/hackage/packages/hackage.html

[Haskell-cafe] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Michael Snoyman
Hi all, There are a number of new feature requests for http-enumerator, and I wanted to discuss some possible API changes with everyone: * Allow keep-alive requests, which will reuse the same connection. * Allow client code to determine whether it accepts a server's SSL certificate. * Allow the

Re: [Haskell-cafe] Haskell function help

2011-02-02 Thread Houdini
*can't -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-function-help-tp3365994p3368001.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell function help

2011-02-02 Thread Houdini
I didn't write it like that...because since I'm using the dot notation I can specify aguments for the function...I rectified that...sorry I forgot to mention -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-function-help-tp3365994p3368000.html Sent from the Haskell

Re: [Haskell-cafe] Gedit Haskell mode plugin indentation

2011-02-02 Thread yukkuri yu!yu!yu!
Update. Current version: v0.8 Changelog: * Fixed some issues with nested lists --- ftp://neverb.net/soft/mine/gedit_haskell_mode/haskell_indentation-latest.tar.gz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Haskell DPLL

2011-02-02 Thread Houdini
One :Thank you Carsten Schultz,Daniel Fischer and all the other for your help. Two:After my last post I wrote some function that should help me in the future,but I need some help with the followint as I'm tired and have to fit in a schedule.I know it is long so I'll try and explain it as short

Re: [Haskell-cafe] Haskell DPLL

2011-02-02 Thread Houdini
I didn't upload the code for the funtion I wrote because of the space...I ca do so If you require. -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-DPLL-tp3368123p3368130.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Re: [Haskell-cafe] Loading bitmap with xlib

2011-02-02 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/2/11 04:03 , Francesco Mazzoli wrote: Conrad Parker conrad at metadecks.org writes: On 31 January 2011 21:40, Francesco Mazzoli f at mazzo.li wrote: Francesco Mazzoli f at mazzo.li writes: At the end I gave up and I wrote the function myself:

[Haskell-cafe] SYB: extending a generic reader with a type class

2011-02-02 Thread Sugar Bzzz
Dear -cafe, Is it possible to extend a generic reader (extR / ext1R from syb) with a type class? For example, let foo :: (Integral a) = SomeMonad a I could write: reader = ... `extR` (foo :: SomeMonad Int) `extR` (foo :: SomeMonad Integer) However, that is tedious. Could I do something

Re: [Haskell-cafe] SYB: extending a generic reader with a type class

2011-02-02 Thread José Pedro Magalhães
Hi, I don't think you can do that, since `ext` relies on Typeable and Typeable only works for monomorphic types. Cheers, Pedro On Wed, Feb 2, 2011 at 20:31, Sugar Bzzz sugarbz...@gmail.com wrote: Dear -cafe, Is it possible to extend a generic reader (extR / ext1R from syb) with a type

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Felipe Almeida Lessa
On Wed, Feb 2, 2011 at 11:57 AM, Michael Snoyman mich...@snoyman.com wrote: As far as keep-alive goes, I still need to do a bit more research, but my basic idea (with credit to Bryan O'Sullivan): * http (and family) will all take an extra argument, Maybe Manager. * Manager will be an abstract

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Michael Snoyman
On Wed, Feb 2, 2011 at 10:15 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Wed, Feb 2, 2011 at 11:57 AM, Michael Snoyman mich...@snoyman.com wrote: As far as keep-alive goes, I still need to do a bit more research, but my basic idea (with credit to Bryan O'Sullivan): * http (and

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Antoine Latter
On Wed, Feb 2, 2011 at 2:28 PM, Michael Snoyman mich...@snoyman.com wrote: On Wed, Feb 2, 2011 at 10:15 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Wed, Feb 2, 2011 at 11:57 AM, Michael Snoyman mich...@snoyman.com wrote: As far as keep-alive goes, I still need to do a bit more

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Felipe Almeida Lessa
On Wed, Feb 2, 2011 at 6:30 PM, Antoine Latter aslat...@gmail.com wrote: Or you could remove the socket from the map while it's in use. And what about connection limits? We shouldn't create a thousand connections to the same host =). -- Felipe. ___

Re: [Haskell-cafe] timely shutdown of timer threads

2011-02-02 Thread Warren Harris
Interesting. I hadn't thought of this solution. You're forking the timer to yet a third thread so that if it continues waiting beyond the checkpoint thread shutdown it doesn't really matter. I guess that works as long as the main thread doesn't wait for all other threads to terminate before

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Antoine Latter
On Wed, Feb 2, 2011 at 3:01 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Wed, Feb 2, 2011 at 6:30 PM, Antoine Latter aslat...@gmail.com wrote: Or you could remove the socket from the map while it's in use. And what about connection limits?  We shouldn't create a thousand

Re: [Haskell-cafe] timely shutdown of timer threads

2011-02-02 Thread Johan Tibell
On Wed, Feb 2, 2011 at 10:42 PM, Warren Harris warrensomeb...@gmail.com wrote: Interesting. I hadn't thought of this solution. You're forking the timer to yet a third thread so that if it continues waiting beyond the checkpoint thread shutdown it doesn't really matter. I guess that works as

Re: [Haskell-cafe] timely shutdown of timer threads

2011-02-02 Thread Warren Harris
On Feb 2, 2011, at 2:02 PM, Johan Tibell wrote: On Wed, Feb 2, 2011 at 10:42 PM, Warren Harris warrensomeb...@gmail.com wrote: Interesting. I hadn't thought of this solution. You're forking the timer to yet a third thread so that if it continues waiting beyond the checkpoint thread

[Haskell-cafe] Haskell Weekly News: Issue 167 - February 02, 2011

2011-02-02 Thread Daniel Santa Cruz
Welcome to issue 167 of the HWN, a newsletter covering developments in the [1]Haskell community. This release covers the week of January 23 to 29, 2011. This week I've added a section which compiles a list of the top answers given in StackOverflow during the week. These seem to be

Re: [Haskell-cafe] timely shutdown of timer threads

2011-02-02 Thread Albert Y. C. Lai
On 11-02-02 04:42 PM, Warren Harris wrote: It still seems to me that haskell is lacking when it comes to operations that can wait for multiple conditions. STM opens the avenue to waiting for multiple conditions. import Control.Concurrent import Control.Concurrent.STM import

[Haskell-cafe] Problems with iteratees

2011-02-02 Thread wren ng thornton
I'm working on a project that's using John Lato's old implementation of iteratees (iteratee = 0.3.5 0.4; I'm hoping to migrate to 0.7 soon, but that's a ways off yet) and I'm running into some issues I haven't been able to untangle. Maybe a new set of eyes can help... The overarching

Re: [Haskell-cafe] Inheritance and Wrappers

2011-02-02 Thread Brandon Moore
OK, what about this as a use case then. I want to create a type class 'Term' with only one function in it. The function returns a 'termTag' which labels the kind of a value in a DSL. class Term a where termTag :: a - String A user of this type-class can happily provide an instance

Re: [Haskell-cafe] Problems with iteratees

2011-02-02 Thread Maciej Wos
I think the problem is that the iteratee you give to I.convStream always returns Just [something] while you should return Nothing on EOF. Suppose you want to have an enumeratee that adds 1 to each integer in the stream and then use stream2list to get an iteratee that consumes the result stream

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Michael Snoyman
On Thu, Feb 3, 2011 at 12:00 AM, Antoine Latter aslat...@gmail.com wrote: On Wed, Feb 2, 2011 at 3:01 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Wed, Feb 2, 2011 at 6:30 PM, Antoine Latter aslat...@gmail.com wrote: Or you could remove the socket from the map while it's in use.

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-02 Thread Antoine Latter
On Wed, Feb 2, 2011 at 11:06 PM, Michael Snoyman mich...@snoyman.com wrote: On Thu, Feb 3, 2011 at 12:00 AM, Antoine Latter aslat...@gmail.com wrote: On Wed, Feb 2, 2011 at 3:01 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Wed, Feb 2, 2011 at 6:30 PM, Antoine Latter

[Haskell-cafe] Another Question

2011-02-02 Thread Navin Rustagi
hi , I am stuck in the following problem. I am maintaining a list of tuples of the form ([Char],Int,Int, Int,Int) . The purpose of maintaining the tuples is that the program reads from a file line by line , Matches the contents with the first element of the tuple and updates the tuple