Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread Karel Gardas
On 04/22/11 01:34 AM, Maciej Marcin Piechotka wrote: On Thu, 2011-04-21 at 21:29 +0100, Andrew Coppin wrote: I'm sure this must be a VFAQ, but... There seems to be universal agreement that Darcs is a nice idea, but is unsuitable for real projects. Even GHC keeps talking about getting rid of

Re: [Haskell-cafe] How to use cabal's data-files feature and run in-place?

2011-04-22 Thread Max Rabkin
On Fri, Apr 22, 2011 at 03:46, Richard Cobbe co...@ccs.neu.edu wrote: Unfortunately, that's not happening.  Cabal is clearly generating the module; I can see it in dist/build/autogen.  But my copy is overriding the autogenerated one, even for cabal builds -- at least, that's what I'm seeing

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread Henning Thielemann
Jason Dagit schrieb: * Every commit needs --ask-deps , because the automatic dependency detector can only detect automatic changes (and not things like adding a new function in a different module) You mean it can only detect dependencies that depend on each

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread Paul R
Maciej I believe the biggest problem was (i.e. when migration started) Maciej that there is no big-name-hosting supporting darcs. When Maciej code.haskell.org went down people were cut off from code. Please forgive me if the answer is obvious : is Darcs storage backend agnostic, or must it

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread David Terei
Good chance you've already read this but if not here is a good post by Linus about his take on the problems with darcs: http://markmail.org/message/vk3gf7ap5auxcxnb I personally think he is right on the money here. The other problem with Darcs is performance. While it has improved a lot its

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread Maciej Marcin Piechotka
On Thu, 2011-04-21 at 19:39 -0500, Jake McArthur wrote: On Thu, Apr 21, 2011 at 7:31 PM, Maciej Marcin Piechotka uzytkown...@gmail.com wrote: Last time I checked it disallowed my as 5 depended on 4 which depended on 3 which depended on 2 which depended on 1 as all changed x.hs Merely

Re: [Haskell-cafe] QuickCheck, (Ord a)= [a] - Property problem

2011-04-22 Thread larry.liuxinyu
Hi, I tested with Haskell platform 2011 with QuickCheck 2.4.0.1. It produced 100 cases passed, but can't report failed case. verboseCheck still told me that [(), (), ... ()] are generated as instance to (Ord a) The only way is to specify the non-ambitious type for example, Int, like below: test

[Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Albert Zeyer
Hi, I thought about implementing memoization which could be applied globally to Haskell as an optimization. I also asked the question (in a bit different way) here: http://stackoverflow.com/questions/5749039/automatic-memoizing-in-functional-programming-languages When you want to do that, the

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-22 Thread Maciej Marcin Piechotka
On Tue, 2011-04-19 at 10:02 -0300, Felipe Almeida Lessa wrote: Now, that's what I get from reading the code. I don't remember if it is explicitly allowed or forbidden for an iteratee to generate leftovers out of nowhere. My guess is that it doesn't make much sense to allow it. For the

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-22 Thread Felipe Almeida Lessa
On Fri, Apr 22, 2011 at 5:54 AM, Maciej Marcin Piechotka uzytkown...@gmail.com wrote: For the record: such code is therefore illegal abab :: Iteratee Char Identity () abab = continue parseA       where parseA (Chunks ('a':'b':xs)) = parseA (Chunks xs)             parseA (Chunks ('a':[])) =

[Haskell-cafe] ANN: Leksah 0.10.0

2011-04-22 Thread Hamish Mackenzie
Yesterday we uploaded our official 0.10.0 release (0.10.0.4) to Hackage and we have Windows and OS X installers at http://leksah.org/download.html Anyone using an earlier version should upgrade. This release is mainly small improvements and bug fixes. Some of the improvements include: * Better

Re: [Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Stephen Tetley
On 22 April 2011 09:50, Albert Zeyer alb...@googlemail.com wrote: [SNIP] I would be interested in implementing such thing myself as an addon for GHC and doing some benchmarks. Could you maybe: - Give me some hints where to start in GHC? I never really have worked on GHC so far. - Suggest some

Re: [Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Albert Zeyer
On Fri, Apr 22, 2011 at 12:55 PM, Stephen Tetley stephen.tet...@gmail.com wrote: There isn't much value to automatic memoization as people have already pointed out on SO - if you believe otherwise, you're probably better off proving a case on paper first before attempting to implement it in

Re: [Haskell-cafe] How to use cabal's data-files feature and run in-place?

2011-04-22 Thread Richard Cobbe
On Thu, Apr 21, 2011 at 11:27:10PM -0500, Antoine Latter wrote: 1. A side note - using the 'cabal' command line tool is easier for many tasks than 'runhaskell Setup'. In particular, it does a user install by default. Interesting -- didn't know that was possible. I didn't see that in the Cabal

Re: [Haskell-cafe] How to use cabal's data-files feature and run in-place?

2011-04-22 Thread Richard Cobbe
On Fri, Apr 22, 2011 at 09:23:32AM +0200, Max Rabkin wrote: On Fri, Apr 22, 2011 at 03:46, Richard Cobbe co...@ccs.neu.edu wrote: Unfortunately, that's not happening.  Cabal is clearly generating the module; I can see it in dist/build/autogen.  But my copy is overriding the autogenerated

Re: [Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Stephen Tetley
Hi Albert My contention is that there are specific programs (or specific functions within them) that memoization improves - hence adding memoization to those programs rather than the compiler is the way to go. Not that I've looked deeply, but I think adding memoization to GHC would be a pretty

[Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Robert Clausecker
Some weeks ago, I mirrored the hugs repo to github. (https://github.com/fuzxxl/Hugs) This was, when I found out, that the last commit was about 2 years ago. Also, since some of the dependencies moved, I was unable to build hugs. Now my question is: Is Hugs dead? What's the status of development

Re: [Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Albert Zeyer
Hi, I was mostly thinking about automatic memoization, i.e. not explicit memoization. Also, it should only add some small constant overhead for each function and maybe leads to huge improvements after all. But maybe I'm also wrong and for an average function it doesn't lead to improvements. But

Re: [Haskell-cafe] How to use cabal's data-files feature and run in-place?

2011-04-22 Thread Daniel Fischer
On Friday 22 April 2011 13:57:36, Richard Cobbe wrote: On Thu, Apr 21, 2011 at 11:27:10PM -0500, Antoine Latter wrote: 1. A side note - using the 'cabal' command line tool is easier for many tasks than 'runhaskell Setup'. In particular, it does a user install by default. Interesting --

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread Simon Michael
On 4/21/11 10:16 PM, wren ng thornton wrote: rather, what I'd like is someplace to keep my code which also provides a good bugtracker. Unfortunately, neither darcsden nor patchtag offer darcsden does include a simple issue tracker now. ___

Re: [Haskell-cafe] How to use cabal's data-files feature and run in-place?

2011-04-22 Thread balodja
On Fri, 2011-04-22 at 05:51 +0400, Richard Cobbe wrote: I did some googling and came across a blog post (http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html) which suggested that I provide my own Paths_pkg.hs file that points to the files' location in the development

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Bryan O'Sullivan
On Fri, Apr 22, 2011 at 5:16 AM, Robert Clausecker fuz...@gmail.com wrote: Now my question is: Is Hugs dead? What's the status of development of hugs? It's been unmaintained for years now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Global memoization in Haskell

2011-04-22 Thread Stephen Tetley
Hi Albert You could try benchmarking with DeltaML instead - DeltaML is the only language I can think of where memoization is (nearly) pervasive, though you need still need to mark memo functions with a keyword as far as I'm aware. This would be a lot easier than modifying GHC:

[Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Evan Laforge
Here's a simple issue that's been with me for a while. As do many people, I use plural variable names for lists, so if a Block as called 'block' then [Block] is 'blocks'. The other pattern that comes up a lot is 'Maybe Block'. When I have to name it, I call it 'maybe_block', e.g. maybe_block -

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Don Stewart
Strong recommendation is to use the Haskell Platform and GHC as your development base, unless you have very specific reasons to use Hugs or one of the other compilers. -- Don On Fri, Apr 22, 2011 at 5:16 AM, Robert Clausecker fuz...@gmail.com wrote: Some weeks ago, I mirrored the hugs repo to

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Matthew Steele
In my own code, I usually use a 'mb' prefix with camelCase, like so: case mbStr of Just str - ... Nothing - ... But I agree that it doesn't always look very nice. I'm curious what others do. On Apr 22, 2011, at 1:14 PM, Evan Laforge wrote: Here's a simple issue that's been with

[Haskell-cafe] fishing for ST mutable Vector examples

2011-04-22 Thread brad clawsie
hi all i was wondering if anyone could post some minimal examples on using mutable Vectors in the ST monad. i've been digging around in the usual places but haven't been able to find anything to get me over the hump thanks in advance brad ___

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Evgeny Tarasov
I do it in a similar way, not just for maybes: paramMay - getHTTPPostParam Param paramStr - maybe (throwError No Param parameter) return paramMay let paramE = parseParam paramStr param - case paramE of Left e - throwError $ Error while parsing Param: ++ show e Right p - return p It'd be great,

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Henning Thielemann
On Fri, 22 Apr 2011, Evgeny Tarasov wrote: I do it in a similar way, not just for maybes: paramMay - getHTTPPostParam Param paramStr - maybe (throwError No Param parameter) return paramMay let paramE = parseParam paramStr param - case paramE of Left e - throwError $ Error while parsing Param:

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Stephen Tetley
Hi Evan The EHC compiler code base seems to use mbSomething as a convention. As EHC has quite a lot of textual information in its source - the code is Haskell + attribute grammars + Shuffle + plus more - the mb convention seems to work well and I adopted it for myself after seeing it there.

Re: [Haskell-cafe] fishing for ST mutable Vector examples

2011-04-22 Thread Don Stewart
In my tutorial on using vectors, http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial There's some examples: http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial#Impure_Arrays that work in IO, and should work equally well in ST (as vectors are parameterized by

Re: [Haskell-cafe] fishing for ST mutable Vector examples

2011-04-22 Thread Stephen Tetley
Hi Brad I think all you can do with an ST array is covered by the MArray class and its derived operations - note the class is exported opaquely from Data.Array.MArray - it has these two members that aren't exported so aren't documented: unsafeRead :: Ix i = a i e - Int - m e unsafeWrite :: Ix

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Evgeny Tarasov
By the way, I'd like to use hugs extensively as sysadmin's universal scripting language. I think, it could be a great killer feature. But as far as I know, it doesn't have any facilities to run external programs and process their stdout, stderr end exit code. Hugs is much more suitable for

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Evan Laforge
Of course, naming will always be a matter of taste. For instance I would not write maybe_something, because I prefer camel case, that is, maybeSomething. On the other hand, I already wrote some Wiki articles that you may read as suggestions for certain naming conventions:  

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Henning Thielemann
On Sat, 23 Apr 2011, Evgeny Tarasov wrote: By the way, I'd like to use hugs extensively as sysadmin's universal scripting language. Hugs is better in this respect because it starts much faster than runghc. I think, it could be a great killer feature. But as far as I know, it doesn't have

[Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Christopher Done
Hi Cédric, I saw your post on Maybe types wondering what the point of it is and why anyone would want it. I thought I'd reply by email as I don't want to infringe on your freedom of expression. If you find that I'm saying things you already know, please scroll down to the bottom, which addresses

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Henning Thielemann
On Fri, 22 Apr 2011, Christopher Done wrote: Use of Fantom's save invoke and Maybe are more or less the same. -- Hard way email = if userList /= Nothing    then let user = findUser bob (fromJust userList)     in if user /= Nothing   then getEmail

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Christopher Done
On 22 April 2011 21:26, Henning Thielemann lemm...@henning-thielemann.dewrote: In idiomatic Haskell you would write case userList of Nothing - Nothing Just plainUserList = let user = findUser bob plainUserList ... since (userList /= Nothing) requires an Eq instance without

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Maciej Marcin Piechotka
On Fri, 2011-04-22 at 21:26 +0200, Henning Thielemann wrote: On Fri, 22 Apr 2011, Christopher Done wrote: Use of Fantom's save invoke and Maybe are more or less the same. -- Hard way email = if userList /= Nothing then let user = findUser bob (fromJust userList)

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Henning Thielemann
On Fri, 22 Apr 2011, Maciej Marcin Piechotka wrote: On Fri, 2011-04-22 at 21:26 +0200, Henning Thielemann wrote: In idiomatic Haskell you would write case userList of Nothing - Nothing Just plainUserList = let user = findUser bob plainUserList ... since (userList /=

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread Miguel Mitrofanov
Well, Maybe IS a monad, so I just use m prefix. Отправлено с iPhone Apr 22, 2011, в 21:14, Evan Laforge qdun...@gmail.com написал(а): Here's a simple issue that's been with me for a while. As do many people, I use plural variable names for lists, so if a Block as called 'block' then [Block]

Re: [Haskell-cafe] fishing for ST mutable Vector examples

2011-04-22 Thread Daniel Fischer
On Friday 22 April 2011 20:14:38, Stephen Tetley wrote: Hi Brad I think all you can do with an ST array is covered by the MArray class and its derived operations - note the class is exported opaquely from Data.Array.MArray - it has these two members that aren't exported so aren't

[Haskell-cafe] ANN: hledger 0.14

2011-04-22 Thread Simon Michael
I'm pleased to announce hledger 0.14. This release includes work by Dmitry Astapov, Eric Kow, Max Bolingbroke, Omari Norman and myself. Thanks especially to Dmitry for helping me with release wrangling. binaries for linux, mac, windows: http://hledger.org/DOWNLOADS.html (64-bit linux

Re: [Haskell-cafe] ANN: Leksah 0.10.0

2011-04-22 Thread Tim Sears
Guys -- I picked up leksah again after a long break (macosx install problem). I have been using leksah for the past two weeks on Ubuntu. Great work! The ability to browse and search libraries for type information and source is fantastic. I love it! All you need now is to let me fill out the

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-22 Thread John A. De Goes
You wouldn't be so confused if you had actually looked at Lato's implementation and compared it to Oleg's most recent version. Regards, John A. De Goes Twitter: @jdegoes LinkedIn: http://linkedin.com/in/jdegoes On Apr 21, 2011, at 6:27 PM, Jason Dagit wrote: On Thu, Apr 21, 2011 at

Re: [Haskell-cafe] Why not Darcs?

2011-04-22 Thread wren ng thornton
On 4/22/11 11:39 AM, Simon Michael wrote: On 4/21/11 10:16 PM, wren ng thornton wrote: rather, what I'd like is someplace to keep my code which also provides a good bugtracker. Unfortunately, neither darcsden nor patchtag offer darcsden does include a simple issue tracker now. Ah,

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread wren ng thornton
On 4/22/11 8:16 AM, Robert Clausecker wrote: Some weeks ago, I mirrored the hugs repo to github. (https://github.com/fuzxxl/Hugs) This was, when I found out, that the last commit was about 2 years ago. Also, since some of the dependencies moved, I was unable to build hugs. Now my question is:

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread wren ng thornton
On 4/22/11 3:26 PM, Henning Thielemann wrote: On Fri, 22 Apr 2011, Christopher Done wrote: Use of Fantom's save invoke and Maybe are more or less the same. -- Hard way email = if userList /= Nothing then let user = findUser bob (fromJust userList) in if user /=

Re: [Haskell-cafe] naming convention for maybes?

2011-04-22 Thread wren ng thornton
On 4/22/11 1:14 PM, Evan Laforge wrote: Here's a simple issue that's been with me for a while. As do many people, I use plural variable names for lists, so if a Block as called 'block' then [Block] is 'blocks'. The other pattern that comes up a lot is 'Maybe Block'. When I have to name it, I

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Maciej Piechotka
On Fri, 2011-04-22 at 22:11 +0200, Henning Thielemann wrote: On Fri, 22 Apr 2011, Maciej Marcin Piechotka wrote: On Fri, 2011-04-22 at 21:26 +0200, Henning Thielemann wrote: In idiomatic Haskell you would write case userList of Nothing - Nothing Just plainUserList =

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-22 Thread Evan Laforge
Most of the (non-IO) runtime errors I get using Haskell software is due to head or fromJust, it's actually quite annoying. Just singling this one out because I've heard it before. I've never gotten a runtime error from these. It seems quite easy to just not use these functions. It's already