Re: [Haskell-cafe] Github support for cabal files

2011-08-08 Thread Henning Thielemann
On 24.07.2011 13:11, Joris Putcuyps wrote: On Sat, 23 Jul 2011 19:25:53 -0700 Greg Weberg...@gregweber.info wrote: [1] http://hackage.haskell.org/package/hamlet The cabal file should be compact, and quite often the description field is very lengthy. I would like it alot if I could

Re: [Haskell-cafe] For class Monoid; better names than mempty mappend might have been: mid (mident) mbinop

2011-08-08 Thread Henning Thielemann
On 24.07.2011 22:20, Antoine Latter wrote: On Sat, Jul 23, 2011 at 1:41 PM, KCkc1...@gmail.com wrote: It would be easier for beginners to grok. I think that assumes that all beginners have a strong foundation in algebra. Although it does have the advantage that the names are as abstract as

[Haskell-cafe] How to use cabal macros in .hsc files

2011-08-08 Thread Bas van Dijk
Hello, Currently it's not possible to use cabal macros like MIN_VERSION_base(x,y,z) in .hsc files: http://hackage.haskell.org/trac/hackage/ticket/870 Is there a workaround to get the same effect? Regards, Bas ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] [Haskell-beginners] Conciseness question

2011-08-08 Thread KC
Sorry, I haven't read all the replies so I don't know if you have completely described the problem you're trying to solve; however, it might be better for people in future to say they want O(1) for insertions, O(lg n) for searching, etc. If they don't want to completely describe what their

Re: [Haskell-cafe] For class Monoid; better names than mempty mappend might have been: mid (mident) mbinop

2011-08-08 Thread KC
As pointed out earlier in this list, the name of the class and the methods are inconsistent. Monoid refers to a general algebraic structure, whereas mempty and mappend refer to certain instances like lists. Thank you for articulating what I was trying to get at. -- -- Regards, KC

Re: [Haskell-cafe] Is there a program to check if a matrix is totally unimodular?

2011-08-08 Thread Daniel Peebles
I haven't come across unimodular matrices before, but according to the definition on wikipedia it seems fairly straightforward to implement a naive algorithm to decide it. Also, have you considered trying IRC for these sorts of short questions? The #haskell IRC channel on freenode is helpful and

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-08 Thread Chris Yuen
Where is the `unsafeAt` function? I can't seem to find it ( http://haskell.org/hoogle/?hoogle=unsafeat). For reference I have asked the same question on StackOverflow. One person suggested that the reason might be that Int64 on Windows is broken (

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-08 Thread Daniel Fischer
On Monday 08 August 2011, 18:24:45, Chris Yuen wrote: Where is the `unsafeAt` function? Data.Array.Base I can't seem to find it ( http://haskell.org/hoogle/?hoogle=unsafeat). Data.Array.Base is not haddocked (there's a reason for that), so hoogle doesn't know about its functions. For

[Haskell-cafe] extending and reusing cmdargs option specs ?

2011-08-08 Thread Simon Michael
Hi Neil, I just spent a day converting hledger from getopt to cmdargs. cmdargs feels more high level and featureful and nicer. And yet... I haven't reduced the line count that much - nothing like your HLint 3:1 ratio. And, I may have made things worse for myself in the reuse/avoiding

Re: [Haskell-cafe] For class Monoid; better names than mempty mappend might have been: mid (mident) mbinop

2011-08-08 Thread Alexander Solla
On Mon, Aug 8, 2011 at 1:56 AM, Henning Thielemann schlepp...@henning-thielemann.de wrote: On 24.07.2011 22:20, Antoine Latter wrote: On Sat, Jul 23, 2011 at 1:41 PM, KCkc1...@gmail.com wrote: It would be easier for beginners to grok. I think that assumes that all beginners have a

[Haskell-cafe] Help understanding Haskell runtime costs

2011-08-08 Thread Thiago Negri
Hello all, I'm relatively new to Haskell and trying to solve some online judge's problems in it. One of the problems is to say if a given sentence is a tautogram or not. A tautogram is just a sentence with all the words starting with the same letter. My first try (solution is ok) was to do it as

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-08 Thread Bryan O'Sullivan
On Mon, Aug 8, 2011 at 9:24 AM, Chris Yuen kizzx2+hask...@gmail.com wrote: For reference I have asked the same question on StackOverflow. One person suggested that the reason might be that Int64 on Windows is broken (

[Haskell-cafe] Couldn't match expected type `Integer' against inferred type `Int'

2011-08-08 Thread Paul Reiners
Why am I getting this error: Couldn't match expected type `Integer' against inferred type `Int' In the expression: foldl step 0 xs In the definition of `asInt_foldAux': asInt_foldAux xs = foldl step 0 xs where

Re: [Haskell-cafe] Couldn't match expected type `Integer' against inferred type `Int'

2011-08-08 Thread Ivan Lazar Miljenovic
On 9 August 2011 10:49, Paul Reiners paul.rein...@gmail.com wrote: Why am I getting this error:     Couldn't match expected type `Integer' against inferred type `Int'     In the expression: foldl step 0 xs     In the definition of `asInt_foldAux':         asInt_foldAux xs                    

Re: [Haskell-cafe] Couldn't match expected type `Integer' against inferred type `Int'

2011-08-08 Thread Paul Reiners
On Aug 8, 2011, at 7:59 PM, Ivan Lazar Miljenovic wrote: On 9 August 2011 10:49, Paul Reiners paul.rein...@gmail.com wrote: Why am I getting this error: Couldn't match expected type `Integer' against inferred type `Int' In the expression: foldl step 0 xs In the definition of

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-08 Thread Reiner Pope
On 9 August 2011 10:06, Bryan O'Sullivan b...@serpentine.com wrote: On Mon, Aug 8, 2011 at 9:24 AM, Chris Yuen kizzx2+hask...@gmail.comwrote: For reference I have asked the same question on StackOverflow. One person suggested that the reason might be that Int64 on Windows is broken (

Re: [Haskell-cafe] Couldn't match expected type `Integer' against inferred type `Int'

2011-08-08 Thread Ivan Lazar Miljenovic
On 9 August 2011 11:06, Paul Reiners paul.rein...@gmail.com wrote: On Aug 8, 2011, at 7:59 PM, Ivan Lazar Miljenovic wrote: On 9 August 2011 10:49, Paul Reiners paul.rein...@gmail.com wrote:                  step acc x = acc * 10 + digitToInt x digitToInt returns an Int; as such the result

Re: [Haskell-cafe] Declarative configuration languages?

2011-08-08 Thread Alexander Solla
On Sun, Aug 7, 2011 at 6:58 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: A colleague just asked me I'm trying to kick off some work into middleware for configuration of large-scale, distributed systems. Have you come across any elegant, declarative configuration

[Haskell-cafe] Problems building lambdabot on osx

2011-08-08 Thread Adam Turoff
I've tried off and on the last couple of days to build Lambdabot on Mac OS X (before and after the upgrade from 10.6 to 10.7) and I keep running into linker errors with the 64-bit Haskell Platform (ghc 7.0.3). First, there's the issue with linking against libiconv, which is solved this way:

[Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-08 Thread Oscar Picasso
Hi, Is there a public blog that that allow syntax highlighting of Haskell code? Oscar Picasso ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-08 Thread Arlen Cuss
9/08/2011 11:54 AM, Oscar Picasso kirjutas: Hi, Is there a public blog that that allow syntax highlighting of Haskell code? Are you talking about a plugin for a blog engine? CodeColourer on WordPress will do it. Arlen ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] extending and reusing cmdargs option specs ?

2011-08-08 Thread wren ng thornton
On 8/8/11 1:59 PM, Simon Michael wrote: And, I may have made things worse for myself in the reuse/avoiding boilerplate department: I'm not sure how to reuse a cmdargs options data structure, extending it with a few more options. This is a big problem I'm dealing with too lately. In particular,

Re: [Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-08 Thread Ivan Lazar Miljenovic
On 9 August 2011 12:04, Arlen Cuss cel...@sairyx.org wrote: 9/08/2011 11:54 AM, Oscar Picasso kirjutas: Hi, Is there a public blog that that allow syntax highlighting of Haskell code? Are you talking about a plugin for a blog engine? CodeColourer on WordPress will do it. I think he meant

Re: [Haskell-cafe] Problems building lambdabot on osx

2011-08-08 Thread Antoine Latter
On Mon, Aug 8, 2011 at 8:38 PM, Adam Turoff adam.tur...@gmail.com wrote: I've tried off and on the last couple of days to build Lambdabot on Mac OS X (before and after the upgrade from 10.6 to 10.7) and I keep running into linker errors with the 64-bit Haskell Platform (ghc 7.0.3). First,

Re: [Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-08 Thread Daniel Patterson
On Aug 8, 2011, at 10:26 PM, Ivan Lazar Miljenovic wrote: On 9 August 2011 12:04, Arlen Cuss cel...@sairyx.org wrote: 9/08/2011 11:54 AM, Oscar Picasso kirjutas: Hi, Is there a public blog that that allow syntax highlighting of Haskell code? Are you talking about a plugin for a blog