Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread Bas van Dijk
On 1 April 2011 21:59, Dmitry Olshansky olshansk...@gmail.com wrote: Is it possible to change enumFile to using MonadIO class? No because it uses the control operation Control.Exception.finally :: IO a - IO b - IO a internally. You can't lift control operations with liftIO :: MonadIO m = IO a -

[Haskell-cafe] Setting up cabal on EC2

2011-04-02 Thread Lyndon Maydwell
Hi all. I'm having some issues setting up cabal on EC2. I've installed ghc 7.0.2, however, the bootstrap.sh script for cabal-install is complaining about missing dependencies: Linking Setup ... Configuring Cabal-1.8.0.2... Setup: At least the following dependencies are missing: base =4 3

Re: [Haskell-cafe] Setting up cabal on EC2

2011-04-02 Thread Daniel Fischer
On Saturday 02 April 2011 11:10:42, Lyndon Maydwell wrote: Hi all. I'm having some issues setting up cabal on EC2. I've installed ghc 7.0.2, however, the bootstrap.sh script for cabal-install is complaining about missing dependencies: Linking Setup ... Configuring Cabal-1.8.0.2...

[Haskell-cafe] Fwd: using IO monad in Iteratee

2011-04-02 Thread Dmitry Olshansky
-- Forwarded message -- From: Dmitry Olshansky olshansk...@gmail.com Date: 2011/4/2 Subject: Re: [Haskell-cafe] using IO monad in Iteratee To: wren ng thornton w...@freegeek.org Well, in my case I can use probably withBinaryFile fn (\h- run $ enumHandle h ...) 2011/4/2 wren

Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread Dmitry Olshansky
Very interesting, thanks. I didn't feel your classes yet... Do you think that provide these instances for Iteratee is possible? 2011/4/2 Bas van Dijk v.dijk@gmail.com On 1 April 2011 21:59, Dmitry Olshansky olshansk...@gmail.com wrote: Is it possible to change enumFile to using MonadIO

Re: [Haskell-cafe] Setting up cabal on EC2

2011-04-02 Thread Lyndon Maydwell
Thanks Daniel! The version of cabal-install on this page seems to be out of date: http://www.haskell.org/cabal/download.html Luckily the other releases are listed at http://www.haskell.org/cabal/release. This seems to have solved my issue. On Sat, Apr 2, 2011 at 5:21 PM, Daniel Fischer

Re: [Haskell-cafe] Setting up cabal on EC2

2011-04-02 Thread Daniel Fischer
On Saturday 02 April 2011 11:51:03, Lyndon Maydwell wrote: The version of cabal-install on this page seems to be out of date: http://www.haskell.org/cabal/download.html So-so. Probably the majority of users are still on ghc-6.*, for them, 0.8.2 is the right choice. The page should have two

[Haskell-cafe] Multi agent system

2011-04-02 Thread Yves Parès
Hello, For the purpose of a simple game, I'm looking for a simple way to get agents communicating with each other, with agents possibly running on different threads: Basically, an agent is Agent :: * - *, since it is parameterized with the type of messages it can receive, and can make two basic

Re: [Haskell-cafe] Multi agent system

2011-04-02 Thread Felipe Almeida Lessa
On Sat, Apr 2, 2011 at 11:16 AM, Yves Parès limestr...@gmail.com wrote: Given that haskell threads are lightweight, is it reasonable to lauch a thread per agent and then implement fetch and send through Chans? It will be simple to implement and to use, but if I have, say, two hundreds of

Re: [Haskell-cafe] [Haskell-beginners] how to modify show for a list of certain types

2011-04-02 Thread Markus Läll
Check out unlines! On Sat, Apr 2, 2011 at 4:32 PM, Manfred Lotz manfred.l...@arcor.de wrote: Hi there, I have a list of say type Record which I write to a file and read back from the file if required. The list's content is a single line in the file it doesn't matter how many records the

Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread John Millikin
Use enumHandle. enumFile deals with the common case of read from the filesystem in IO. It can't deal with general MonadIO monads because there'd be no guarantee that the handle would actually be closed (eg, an ErrorT IO might never run the cleanup). If you need a special monad, do something

Re: [Haskell-cafe] Setting up cabal on EC2

2011-04-02 Thread Lyndon Maydwell
Many thanks to the Cabal devs :-) On Sat, Apr 2, 2011 at 7:12 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Saturday 02 April 2011 11:51:03, Lyndon Maydwell wrote: The version of cabal-install on this page seems to be out of date: http://www.haskell.org/cabal/download.html

Re: [Haskell-cafe] Asynchronous Arrows need Type Specialization - Help!

2011-04-02 Thread Paul L
Sorry, forgot to CC the list. I wonder why Gmail doesn't default to reply-all. On Fri, Apr 1, 2011 at 9:48 PM, David Barbour dmbarb...@gmail.com wrote: If we ignore the 'delay' primitive (which lifts latency into program logic), my model does meet all the arrow laws. Nonetheless, the issues

Re: [Haskell-cafe] Asynchronous Arrows need Type Specialization - Help!

2011-04-02 Thread Luke Palmer
On Sat, Apr 2, 2011 at 10:09 AM, Paul L nine...@gmail.com wrote: Sorry, forgot to CC the list. I wonder why Gmail doesn't default to reply-all. If you have keyboard shortcuts on, reply to messages with the a key instead of the r key. I hardly ever use r. Luke On Fri, Apr 1, 2011 at 9:48

Re: [Haskell-cafe] darcs repo browser

2011-04-02 Thread Joachim Breitner
Hi, Am Samstag, den 02.04.2011, 01:51 +0200 schrieb Radoslav Dorcik: there is one haskell web application based on happstack for viewing foreign darcs repos exposed only on pure HTTP servers. I need that for checking status of some repositories when I don't have access to darcs

Re: [Haskell-cafe] 7th Ghent Functional Programming Group meeting on Tuesday, April 26

2011-04-02 Thread oliver mueller
sounds like an interesting program... you should think about making the talks available later for those who can not attend. br, oliver On Apr 1, 7:20 pm, Jasper Van der Jeugt jasper...@gmail.com wrote: Dear all, We are very glad to announce an exciting program for the 7th meeting of the Ghent

Re: [Haskell-cafe] darcs repo browser

2011-04-02 Thread Roel van Dijk
Nice work! The view file part seems to have problems with utf-8 encoded files: http://handra.rampa.sk/dawb/view?repoVURL=http%3A%2F%2Fcode.haskell.org%2FnumeralsrepoVFile=test%2FText%2FNumeral%2FLanguage%2FZH%2FTestData.hs It is unreadable even when explicitly asking my browser to decode the

Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread Ertugrul Soeylemez
Bas van Dijk v.dijk@gmail.com wrote: On 1 April 2011 21:59, Dmitry Olshansky olshansk...@gmail.com wrote: Is it possible to change enumFile to using MonadIO class? No because it uses the control operation Control.Exception.finally :: IO a - IO b - IO a internally. You can't lift control

Re: [Haskell-cafe] pool, persistent, persistent-sqlite: Space leak

2011-04-02 Thread Ertugrul Soeylemez
Michael Snoyman mich...@snoyman.com wrote: Good catch, that was most definitely a space leak in pool. I've uploaded version 0.0.1.1, would you mind testing? Great! I will test it and report back, as soon as I'm at home. Many thanks. Greets, Ertugrul -- nightmare = unsafePerformIO

Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread Dmitry Olshansky
Ertugrul, thanks for information. I've found several decisions for my real problem (using enumHandle and some more special decision). But I'll be have in mind about monad-control. 2011/4/3 Ertugrul Soeylemez e...@ertes.de Bas van Dijk v.dijk@gmail.com wrote: On 1 April 2011 21:59,