Re: [Haskell-cafe] ghc/dph

2010-12-15 Thread Roman Leshchinskiy
On 14/12/2010, at 13:35, Johannes Waldmann wrote: 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? That's a tricky question. We are currently working on getting DPH to work

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

2010-12-15 Thread Max Bolingbroke
3, John Smith volderm...@hotmail.com wrote: I would like to formally propose that Monad become a subclass of Applicative I'm not in favour of this change because of the code breakage issue. However, I think that an acceptable plan (mentioned elsewhere on the list, but doesn't seem to have had

[Haskell-cafe] Behaviour of System.Directory.getModificationTime

2010-12-15 Thread Arnaud Bailly
Hello, I am writing a program which scans a bunch of directories to detect changes (added, modified, deleted files). To detect modification, I would like to use getModification, doing something like the following: -- |Stores last modified timestamp of the file -- Yes, I come from Java... type

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

2010-12-15 Thread John Smith
On 15/12/2010 04:01, Jonathan Geddes wrote: 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

Re: [Haskell-cafe] lhs2tex build failure

2010-12-15 Thread Andres Loeh
The latest version on GitHub should fix the problem. I'll make a new release soon. https://github.com/kosmikus/lhs2tex Cheers, Andres ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2010-12-15 Thread Tillmann Rendel
Hi John, John Smith wrote: Perhaps pattern match failures in a MonadPlus should bind to mzero - I believe that this is what your example and similar wish to achieve. You updated the proposal to say: a failed pattern match should error in the same way as is does for pure code, while in

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

2010-12-15 Thread Lennart Augustsson
Any refutable pattern match in do would force MonadFail (or MonadPlus if you prefer). So 1. (MonadFail m) = a - m a, \ a - return a 2. (MonadFail m) = m a, mfail ... 3. (MonadFail m) = Maybe a - m a, \ a - case a of Nothing - mfail ...; Just x - return x 4. (Monad m) = a - b - m a, \

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

2010-12-15 Thread Tillmann Rendel
John Smith proposed: a failed pattern match should error in the same way as is does for pure code, while in MonadPlus, the current behaviour could be maintained with mzero Lennart Augustsson wrote: Any refutable pattern match in do would force MonadFail (or MonadPlus if you prefer). I guess

Re: [Haskell-cafe] ghc/dph

2010-12-15 Thread J . Waldmann
It looks like your best bet may be to use GHC 6.12 but then the question remains: what version exactly, and where do I get it. it seems I need something that was HEAD at the time (6.13.* ?) but I don't find older snapshot releases on http://haskell.org/ghc/dist/ Thanks - J.W.

[Haskell-cafe] par / pseq example

2010-12-15 Thread J . Waldmann
I was trying to find an easy example for par/pseq, and I finally used plain mergesort ( on Prelude.[] ) and I observed that it is best to give +RTS -A1G (or more) such that there are only very few garbage collections. This roughly cuts execution time in half (from +RTS -N1 to -N4, on an i7 CPU)

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

2010-12-15 Thread Gregory Collins
On Wed, Dec 15, 2010 at 12:20 AM, Antoine Latter aslat...@gmail.com wrote: 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

[Haskell-cafe] installing gtk2

2010-12-15 Thread Max Buchholz
Hi everybody,I've got problems installing gtk2 onMac OS X 10.6.5.Here's the error message I receive when I try to install gtk2: bli-dor-nb01:~ max-buchholz$ sudo port install gvfs Password: --- Computing dependencies for gvfs --- Building gvfs Error: Target org.macports.build returned: shell

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

2010-12-15 Thread John Smith
On 15/12/2010 11:39, Lennart Augustsson wrote: Any refutable pattern match in do would force MonadFail (or MonadPlus if you prefer). So 1. (MonadFail m) = a - m a, \ a - return a 2. (MonadFail m) = m a, mfail ... 3. (MonadFail m) = Maybe a - m a, \ a - case a of Nothing - mfail ...;

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

2010-12-15 Thread Lennart Augustsson
Yes, I think there should be a MonadFail distinct from MonadPlus. Some types, like IO, are not in MonadPlus, but have a special implementation of the fail method. Personally, I think fail should just be removed, but that would break existing code. The fail method was introduced for the wrong

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread Simon Marlow
On 13/12/2010 15:45, Peter Simons wrote: Hi Mathieu, Why don't you use ulimit for this job? $ ulimit -m 32M; ./cpsa yes, I was thinking the same thing. Relying exclusively on GHC's ability to limit run-time memory consumption feels like an odd choice for this task. It's nice that

[Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
Hello Café, I was wondering if using infinite lists was a viable and efficient solution in haskell programs (I mean not simple prototypes) : I was considering using them to model agents in a hierarchical multi-agent application for school. A list would representate the state of an agent at a step

[Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Dimitry Golubovsky
Hi, In MSIE6, hask tags are rendered like this (from the Monad_Transformers page): transformers: provides the classes MonadTrans and MonadIO , as well as concrete monad transformers such as StateT ... etc. The Wiki source: [http://hackage.haskell.org/package/transformers transformers]:

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Ross Paterson
On Wed, Dec 15, 2010 at 09:01:49AM -0500, Dimitry Golubovsky wrote: HTML (a small piece of it): provides the classes div class=inline-codediv dir=ltr style=text-align: left;div class=source-haskell style=font-family: monospace;MonadTrans/div/div/div Words MonadTrans, MonadIO, StateT etc

Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread John Lato
From: Permjacov Evgeniy permea...@gmail.com current links https://github.com/permeakra/Rank2Iteratee https://github.com/permeakra/PassiveIteratee The main difference from 'original' iteratees I read about is that both do not use 'chunks' and pass data one-by-one. So, what I wrote may be

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Henk-Jan van Tuyl
On Wed, 15 Dec 2010 15:01:49 +0100, Dimitry Golubovsky golubov...@gmail.com wrote: Hi, In MSIE6, hask tags are rendered like this (from the Monad_Transformers page): transformers: provides the classes MonadTrans and MonadIO , as well as concrete monad transformers such as StateT MSIE8

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread Peter Simons
Hi John, I think the previous responder was asserting the 32M limit, not you. I believe the previous poster suggested that you use ulimit to provide a hard upper bound for run-time memory use. That 32M figure seemed to be made up out of thin air just as an example to illustrate the syntax of

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 02:52:11PM +0100, Yves Parès wrote: Hello Café, So is it viable or would the use of multiple infinite lists kill the performances? Sounds perfectly reasonable to me. I don't see any reason why using multiple infinite lists would have anything to do with the

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

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote: On 15/12/2010 11:39, Lennart Augustsson wrote: Any refutable pattern match in do would force MonadFail (or MonadPlus if you prefer). So 1. (MonadFail m) = a - m a, \ a - return a 2. (MonadFail m) = m a, mfail ... 3.

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
try to compute their length Yes ^^, that's silly. I don't see any reason why using multiple infinite lists would have anything to do with the performance That's comforting. Well, it seems to be a very simple, haskellish and elegant solution, so basic pragmatism -- with an slice of pessimism

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 09:01 -0500, Dimitry Golubovsky wrote: Hi, In MSIE6, hask tags are rendered like this (from the Monad_Transformers page): transformers: provides the classes MonadTrans and MonadIO , as well as concrete monad transformers such as StateT ... etc. The Wiki

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

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 06:25:30PM +0100, Maciej Piechotka wrote: On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote: On 15/12/2010 11:39, Lennart Augustsson wrote: Any refutable pattern match in do would force MonadFail (or MonadPlus if you prefer). So 1. (MonadFail m) = a - m a,

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Neil Mitchell
Hi In general I'd say that MSIE should be avoided and updated to newer version like 7 or 8 (according to wikipedia they should be avaible for Windows XP - or at least they were available when Windows XP was supported) - IE6 have technology from 2001. I understand however that it may be

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

2010-12-15 Thread Conor McBride
On 15 Dec 2010, at 17:48, Brent Yorgey wrote: On Wed, Dec 15, 2010 at 06:25:30PM +0100, Maciej Piechotka wrote: On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote: On 15/12/2010 11:39, Lennart Augustsson wrote: Any refutable pattern match in do would force MonadFail (or MonadPlus if you

Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread Permjacov Evgeniy
On 12/15/2010 05:48 PM, John Lato wrote: From: Permjacov Evgeniy permea...@gmail.com mailto:permea...@gmail.com current links https://github.com/permeakra/Rank2Iteratee https://github.com/permeakra/PassiveIteratee The main difference from 'original' iteratees I

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Edward Z. Yang
It sounds like a good fit for your problem as stated. One thing to note is that Haskell will give you great abstractions for very strong amounts of code, as long as what you want to do is a good fit for the abstraction. Haskell makes it quite hard to fit a square peg into a round hole, so if one

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 17:56 +, Neil Mitchell wrote: Hi In general I'd say that MSIE should be avoided and updated to newer version like 7 or 8 (according to wikipedia they should be avaible for Windows XP - or at least they were available when Windows XP was supported) - IE6 have

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
if one day you decide you need an agent that generates random numbers I could say that my agents now run in a certain monad, I just would have to transform my basic agents to : agent1 = liftM . fmap (*2) (or even agen1 = fmap . fmap (*2), however it is less readable IMO) Thanks for your

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 06:38:04PM +0100, Yves Parès wrote: try to compute their length Yes ^^, that's silly. I don't see any reason why using multiple infinite lists would have anything to do with the performance That's comforting. Well, it seems to be a very simple, haskellish and

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Colin Adams
On 15 December 2010 18:23, Maciej Piechotka uzytkown...@gmail.com wrote: For reference, the new Haddock style also gives various rendering issues in IE6. I reported these a while back (to Mark) but never got any response. Thanks, Neil I cannot speak for anyone but from what I

Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Edward Z. Yang
Excerpts from Yves Parès's message of Wed Dec 15 13:28:11 -0500 2010: if one day you decide you need an agent that generates random numbers I could say that my agents now run in a certain monad, I just would have to transform my basic agents to : agent1 = liftM . fmap (*2) (or even agen1

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Henk-Jan van Tuyl
On Wed, 15 Dec 2010 18:45:10 +0100, Maciej Piechotka uzytkown...@gmail.com wrote: : You can always test on pages like http://browsershots.org/http://haskell.org/haskellwiki/Monad_Transformers : : PS. BTW - does anyone have statistics on browser share on Haskell site? According to Wikipedia

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Thomas Schilling
Yes, the current syntax highligthing plugin (SyntaxHighlight_GeSHi) is quite annoying. It's the version that comes with debian which has the advantage that it will be updated automatically. However, it the surrounding div class=inline-code is my attempt at hacking around the fact that it doesn't

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Richard O'Keefe
On 16/12/2010, at 3:31 AM, Ross Paterson wrote: On Wed, Dec 15, 2010 at 09:01:49AM -0500, Dimitry Golubovsky wrote: HTML (a small piece of it): provides the classes div class=inline-codediv dir=ltr style=text-align: left;div class=source-haskell style=font-family:

Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread Permjacov Evgeniy
On 12/15/2010 05:48 PM, John Lato wrote: From: Permjacov Evgeniy permea...@gmail.com mailto:permea...@gmail.com current links https://github.com/permeakra/Rank2Iteratee https://github.com/permeakra/PassiveIteratee The main difference from 'original' iteratees I

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread John D. Ramsdell
On Wed, Dec 15, 2010 at 7:59 AM, Simon Marlow marlo...@gmail.com wrote:  The -M flag causes the GC algorithm to switch from copying (fast but hungry) to compaction (slow but frugal) as the limit approaches. Ah, so that's what it's doing. My measurements say that part of the code is working

[Haskell-cafe] Gtk 0.12.0, Windows 7, Haskell Platform 2010.2.0.0, build error

2010-12-15 Thread aditya siram
Hi all, I am having some issues building Gtk2Hs on Windows 7. It completes compiling the whole thing and then errors out with this message: Registering gtk-0.12.0... setup.exe: WARNING: cache is out of date: c:/Program Files/Haskell Platform/2010.2.0.0\lib\package.conf.d\package.cache use 'ghc-pkg

[Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
Hi, I see this kind of information a lot when I using cabal to install package. Or sometimes same packages both exist in global and user space, which is a shadowed by message. How to resolve that? Thanks. Resolving dependencies... command line: cannot satisfy -package Cabal-1.10.0.0:

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 13:35, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  I see this kind of information a lot when I using cabal to install package. Or sometimes same packages both exist in global and user space, which is a shadowed by message.  How to resolve that? Thanks.

[Haskell-cafe] Haskell Weekly News: Issue 162 - December 15, 2010

2010-12-15 Thread Daniel Santa Cruz
Welcome to issue 162 of the HWN, a newsletter covering developments in the [1]Haskell community in the week of December 05 - 11. Wouter Swierstra [2]sent a call for papers for the ICFP 2011 to be held in Tokyo, Japan between September 19 - 21. The announcement contains all relevant

Re: [Haskell-cafe] cannot install regex-posix using cabal ?

2010-12-15 Thread z_axis
canot it be fixed ? - e^(π.i) + 1 = 0 -- View this message in context: http://haskell.1045720.n5.nabble.com/cannot-install-regex-posix-using-cabal-tp3301201p3307465.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 10:55 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 December 2010 13:35, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  I see this kind of information a lot when I using cabal to install package. Or sometimes same packages both exist

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 2:24 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: On Thu, Dec 16, 2010 at 10:55 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 December 2010 13:35, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  I see this kind of

Re: [Haskell-cafe] $ do?

2010-12-15 Thread Brandon Moore
From: Roman Cheplyaka r...@ro-che.info Sent: Wed, December 15, 2010 1:36:55 AM * 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

Re: [Haskell-cafe] Beginners help

2010-12-15 Thread z_axis
According to map's definition, we know the 'fs' should be a list of function. so 'p' need a [a-b] as its parameter.And the result of 'p' should be a list of function which accepts [a] and return [b]. So the type of 'p' is [a-b] - [[a] - [b]] hope i make it clear. - e^(π.i) + 1 = 0 --

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 17:26, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: And, sure, I could reinstall Cabal. Then things seem fine. But it is weird. I have to have the same packages installed at two places of the system. What makes you say that? Does ghc-pkg list show it twice?

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 December 2010 17:26, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: And, sure, I could reinstall Cabal. Then things seem fine. But it is weird. I have to have the same packages installed

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 18:30, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic For example, now I have message as this when installing darcs. command line: cannot satisfy -package Cabal-1.10.0.0:    

Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 3:48 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 December 2010 18:30, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic For example, now I have message as this when installing darcs.