Re: [Haskell-cafe] Functor = Applicative = Monad

2010-12-14 Thread Isaac Dupree
On 12/14/10 03:13, John Smith wrote: I would like to formally propose that Monad become a subclass of Applicative, with a call for consensus by 1 February. The change is described on the wiki at http://haskell.org/haskellwiki/Functor-Applicative-Monad_Proposal, That page isn't written as a

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-14 Thread Markus Läll
The reason for mirror was avilability, yes, and when the signatures were only on the central sever, then the user could choose not to install packages from mirrors, when they were not available. But now if the signatures were generated by the uploader, then the morrors would be just as secure as

Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-14 Thread Conor McBride
[switching to cafe] On 14 Dec 2010, at 08:59, Sittampalam, Ganesh wrote: John Smith wrote: I would like to formally propose that Monad become a subclass of Applicative, with a call for consensus by 1 February. I would prefer that we have some proposal like class aliases implemented

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Mads Lindstrøm
Hi Vincent, I got it to work :) But there seems to be some bugs in the Haskell server certificate handling. It seems that TLS do not transfer the ST (state, as in California) parameter in the X509 subject field. It also seems that the Haskell server do not send the email-address. The reason for

[Haskell-cafe] ghc/dph

2010-12-14 Thread Johannes Waldmann
Hi, I want to use dph (data parallel haskell) for a presentation. (Nothing fancy, just compile and run some demos.) What ghc version should I use and where do I get it? I read the advice use HEAD but when I build from the 7.1.20101213 source snapshot, dph is not installed (should it be?) Best -

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-12-14 Thread Henning Thielemann
On Mon, 13 Dec 2010, John Meacham wrote: A better plan would be to start depending on 'haskell2010' or 'haskell98' and get rid of explicit dependencies on 'base' altogether. Since those are standardized between compilers. I admit that once in the past I have replaced all dependencies on

[Haskell-cafe] Identity type

2010-12-14 Thread Pierre-Etienne Meunier
Hi, Is there something like an identity type, transparent to the type-checker, in haskell ? For instance, I'm defining an interval arithmetic, with polynomials, matrices, and all that... defined with intervals. The types are : Polynomial Interval (instead of Polynomial Double for instance)

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-14 Thread Peter Simons
Hi John, On Mon, Dec 13, 2010 at 10:45 AM, Peter Simons sim...@cryp.to wrote: Relying exclusively on GHC's ability to limit run-time memory consumption feels like an odd choice for this task. It's nice that this feature exists in GHC, but it's inherently non-portable and outside of

Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-14 Thread Tillmann Rendel
Hi, John Smith wrote: I would like to formally propose that Monad become a subclass of Applicative A lot of code would break because of this change, but all problems should be reported at compile time, and are easy to fix. In most of the cases, either adding obvious Functor and Applicative

Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-14 Thread Antoine Latter
2010/12/14 Tillmann Rendel ren...@informatik.uni-marburg.de: Hi, John Smith wrote: I would like to formally propose that Monad become a subclass of Applicative A lot of code would break because of this change, but all problems should be reported at compile time, and are easy to fix. In

[Haskell-cafe] CBRef, a wrapper around IORef with callbacks

2010-12-14 Thread Dmitry V'yal
Hello, while building GUIs using Gtk2HS I always struggled with the following question: how to sync the state of the GUI with the state of the rest application. I usually make several IORefs store the state there. But it's quite easy to forget to update relevant parts of GUI when state

[Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-14 Thread Mads Lindstrøm
Hi Haskeleers, I got a working SSL server using the TLS package. Great. However, I really intended to use SSL for an asynchronous server. That is, the server must constantly listen for a client message, which may result in zero or more messages send _to_ the client. And the server will, without

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Florian Weimer
* Mads Lindstrøm: I got it to work :) But there seems to be some bugs in the Haskell server certificate handling. It seems that TLS do not transfer the ST (state, as in California) parameter in the X509 subject field. It also seems that the Haskell server do not send the email-address. And

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-14 Thread Brandon Moore
Hi Peter I beg your pardon? I didn't say anything about 32M. I said that designing software to rely on a GHC-enforced memory limit as a means of dealing with infinite loops feels really not like a particularly good solution. As I understand the discussion, it's not about infinite loops.

Re: [Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-14 Thread Antoine Latter
Maybe I'm missing something - but shouldn't the code listening on the Handle already be in it's own thread? The general recipe is: 1. Bind a socket to port 2. Call Network.accept, then take the resultant Handle, call forkIO with the TLS actions and the resultant handle. Go back to 1. So even

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Vincent Hanquez
On Tue, Dec 14, 2010 at 11:41:29AM +0100, Mads Lindstrøm wrote: Hi Vincent, I got it to work :) But there seems to be some bugs in the Haskell server certificate handling. It seems that TLS do not transfer the ST (state, as in California) parameter in the X509 subject field. It also seems

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Vincent Hanquez
On Tue, Dec 14, 2010 at 10:24:29PM +0100, Florian Weimer wrote: * Mads Lindstrøm: I got it to work :) But there seems to be some bugs in the Haskell server certificate handling. It seems that TLS do not transfer the ST (state, as in California) parameter in the X509 subject field. It also

Re: [Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-14 Thread Vincent Hanquez
On Tue, Dec 14, 2010 at 09:21:48PM +0100, Mads Lindstrøm wrote: Hi Haskeleers, [snip] It seems to me that a general SSL implementation should not preclude asynchronous servers. I know, the TLS package is not more than a few months old and one can already use it for SSL servers and clients,

[Haskell-cafe] Iteratee-like

2010-12-14 Thread Permjacov Evgeniy
Ok, I think, I made it right now. I wrote two versions of the very same module with roughly the same interface. It is minimalistic framework for producing, transforming, zipping and folding streaming data (a sample code that does file IO provided, but it is not well tested yet). One version abuses

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-14 Thread John D. Ramsdell
On Tue, Dec 14, 2010 at 1:48 PM, Peter Simons sim...@cryp.to wrote: I beg your pardon? I didn't say anything about 32M. I said that designing software to rely on a GHC-enforced memory limit as a means of dealing with infinite loops feels really not like a particularly good solution. Sorry

Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-14 Thread Jonathan Geddes
Fail can't just be removed. That would just break too much code. For example, I find myself writing code like the following: [a,b,c] - Just someList in place of let [a,b,c] = someList so that pattern match failure is lifted into the maybe monad (as long as I'm already in the maybe monad). I

[Haskell-cafe] $ do?

2010-12-14 Thread Jonathan Geddes
Quick question: Why do I need the $ in the following bits of code? main = withSocketsDo $ do --do something with sockets foo = fromMaybe 0 $ do --do something in the maybe monad I don't see (after admittedly only a minute or so thinking about it) where any grammar ambiguities would

Re: [Haskell-cafe] ghc/dph

2010-12-14 Thread Jason
J.W., This came up recently here: http://www.mail-archive.com/haskell-cafe@haskell.org/msg84528.html http://www.mail-archive.com/haskell-cafe@haskell.org/msg84528.htmlIt looks like your best bet may be to use GHC 6.12 until the now-separate dph libraries are released. -- Jason M. Knight Ph.D.

[Haskell-cafe] lhs2tex build failure

2010-12-14 Thread Permjacov Evgeniy
Hello! I use ghc-7.0.1 and cabal 1.10.0 . When tried to install lhs2tex-1.16 I got error in Setup.lhs: === Setup.hs:294:46: `programArgs' is not a (visible) field of constructor `ConfiguredProgram' Setup.hs:296:46: `programArgs' is not a (visible) field of

Re: [Haskell-cafe] $ do?

2010-12-14 Thread Roman Cheplyaka
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700] Quick question: Why do I need the $ in the following bits of code? main = withSocketsDo $ do --do something with sockets foo = fromMaybe 0 $ do --do something in the maybe monad I don't see (after