Re: [Haskell-cafe] View Thunk Evaluation

2011-06-26 Thread Tom Murphy
That is so cool! Thank you. To anyone who's interested: Try it. It's enlightening. Tom On 6/26/11, Don Stewart wrote: > Yes, via the -hpc tracing mechanism. > > When executed HPC generates a highlighted log of your source, and > expressions that aren't evaluated will be marked up in a special >

[Haskell-cafe] Trouble with `foldl` in composition chain.

2011-06-26 Thread David Banas
When profiling this code: consolidateRPR :: [Sample] -> [Sample] smplUnionRecursRev :: [Sample] -> Sample -> [Sample] sortSamps :: [Sample] -> [Sample] smplSetUnion :: [Sample] -> [Sample] smplSetUnion = consolidateRPR . (foldl smp

Re: [Haskell-cafe] View Thunk Evaluation

2011-06-26 Thread Don Stewart
Yes, via the -hpc tracing mechanism. When executed HPC generates a highlighted log of your source, and expressions that aren't evaluated will be marked up in a special color. On Sun, Jun 26, 2011 at 9:22 PM, Tom Murphy wrote: > Hi All, >     Is there a way to determine whether a thunk was evalua

[Haskell-cafe] View Thunk Evaluation

2011-06-26 Thread Tom Murphy
Hi All, Is there a way to determine whether a thunk was evaluated during code's execution? Thanks, Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Alex Lexer Performance Issues

2011-06-26 Thread Richard O'Keefe
On 26/06/2011, at 10:19 PM, Malcolm Wallace wrote: > There is an old folklore that lexing is usually the most expensive phase of > any compiler-like traversal. 50% of time and space expended on lexing was > pretty common twenty years ago. Indeed it is old, but no, it isn't folklore, you'll fin

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 21:15:06 +0100, Paterson, Ross wrote: > > > True. That ambiguity could be avoided by adding the word "declaration" > > after "type signature". > > On second thoughts, this is unnecessary. The Report consistently uses > "expression type signature" for the expression and "type

[Haskell-cafe] Data.Enumerator.List.concatMap is to Data.Iteratee.?

2011-06-26 Thread David Place
Hi: I've been studying iteratee IO. Is there a function in the iteratee package that is analogous to Data.Enumerator.List.concatMap? David Place Owner, Panpipes Ho! LLC http://panpipesho.com d...@vidplace.com ___ Haskell-C

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> > Still, the clause > > > > b1 contains a free identifier that has no type signature and > > is bound by b2 > > > > applies the phrase "has no type signature" to the identifier, not to > > the binding. Such phrasing does not exclude expression > > type-signatures. > > True. Tha

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> Still, the clause > > b1 contains a free identifier that has no type signature and > is bound by b2 > > applies the phrase "has no type signature" to the identifier, not to > the binding. Such phrasing does not exclude expression > type-signatures. True. That ambiguity could be

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 09:31:05 +0100, Paterson, Ross wrote: > > Indeed, the Report has two problems: > > Sections 4.4.3.2 and 4.5.5 have different definitions of "simple pattern". > This has been there since section 4.5.5 (Monomorphism Restriction) was > added in Haskell 1.1. But then the only tec

Re: [Haskell-cafe] Can't use libraries in haskell

2011-06-26 Thread Jason Dagit
2011/6/26 Александр : > Thank you, for reply. > > Yes i use ghc. > >>First thing is to do 'ghc-pkg list'. If your package doesn't show up >>then it's not installed, according to the package registry. 'cabal >>install' should have registered it. If it is in the list, then it >>depends how you're bui

[Haskell-cafe] Period of a sequence

2011-06-26 Thread michael rice
MathWorks has the function seqperiod(x) to return the period of sequence x. Is there an equivalent function in Haskell? Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] commutative monoid?

2011-06-26 Thread Brent Yorgey
On Sat, Jun 25, 2011 at 02:34:47PM -0700, Evan Laforge wrote: > On Sat, Jun 25, 2011 at 2:02 PM, Brent Yorgey wrote: > > Actually, there are (at least) four: there's also the one where > > mappend = liftA2 mappend, i.e. introduce potential failure into a > > monoid operation defined on the values.

Re: [Haskell-cafe] Data.Time

2011-06-26 Thread Malcolm Wallace
On 26 Jun 2011, at 01:53, Tony Morris wrote: > Having only had a flirt with Data.Time previously, I assumed > it would be robust like many other haskell libraries. If, by lack of robustness, you mean that you get runtime errors, then consider them bugs, and file them with the author/maintainer

Re: [Haskell-cafe] Alex Lexer Performance Issues

2011-06-26 Thread Malcolm Wallace
On 22 Jun 2011, at 15:53, Tristan Ravitch wrote: > On Wed, Jun 22, 2011 at 07:48:40AM +0100, Stephen Tetley wrote: >> How fast is good old String rather than ByteString? >> >> For lexing, String is a good fit (cheap deconstruction at the head / >> front). For your particular case, maybe it loses

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> If this is the case, then multiple sentences in the 2010 report don't > make sense, though the way in which they don't make sense sort of > depends on what "simple pattern binding" means. Indeed, the Report has two problems: Sections 4.4.3.2 and 4.5.5 have different definitions of "simple patte

Re: [Haskell-cafe] Can't use libraries in haskell

2011-06-26 Thread Александр
Thank you, for reply. Yes i use ghc. >First thing is to do 'ghc-pkg list'. If your package doesn't show up >then it's not installed, according to the package registry. 'cabal >install' should have registered it. If it is in the list, then it >depends how you're building. If you use ghc manually,

Re: [Haskell-cafe] Can't use libraries in haskell

2011-06-26 Thread Evan Laforge
> What's wrong? How can i install and use library in haskell? First thing is to do 'ghc-pkg list'. If your package doesn't show up then it's not installed, according to the package registry. 'cabal install' should have registered it. If it is in the list, then it depends how you're building. I