Re: [Haskell] ~ type operator
On Friday 24 June 2011, 10:26:42, Guy wrote: > What does the ~ type operator mean? I've sometimes seen types such as (a > ~ b) in error messages, but can't understand what GHC is trying to tell > me. Type equality, (a ~ b) means that a and b are the same type (rather, that the compiler can prove they're the same). ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] ANNOUNCE: floatshow-0.1 faster String representations for Double and Float
The Show instances for RealFloat types provided in base are very elegant, as they produce the shortest string which 'read' converts back to the original number. That, however, involves a check after each digit has been determined and arithmetic of usually fairly large Integers, which makes these Show instances rather slow. For cases where having the conversion fast is more important than having it produce elegant output, the floatshow package provides alternative conversions, which avoid the checks and reduce the occurrences of large Integers by just producing a sufficiently long output string. The speed gain can be substantial if the numbers have exponents of large absolute modulus, but for the more common case of numbers whose exponents have small absolute modulus, the difference is (although still significant for Double) too small in my opinion to seriously consider replacing the Show instances. Therefore I've put these functions into their own package. In my benchmarks, the speed gain ranges from 4x to 10x for Double and from 1.25x to 5x for Float, so the package may be a useful alternative for tasks requiring the output of many floating point numbers. Sadly, floatshow is non-portable and requires ghc >= 6.12. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell] ANN: Yi 0.6.3
On Monday 28 March 2011 23:06:16, Ivan Lazar Miljenovic wrote: > Not everyone has the Platform installed! (I prefer to install ghc > and then just the libraries I need via my package manager). +1 - except I cabal-install the libraries I need (and have alex installed anyway). ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell] I'm a beginner --- struggling with the SimpleJSON example from Real World Haskell
On Tuesday 14 December 2010 22:44:23, David Jameson wrote: > OMG --- that was it --- I can't tell you how many hours I have been > wrestling with this. > > Thank you so much for the quick response. > > I was aware that Haskell required indentation for some things (and I'm a > fan of indentation) but I didn't realize it required NO indentation for > some things --- I thought that went away with FORTRAN (grin) Well, you could have indented the rest of the code to the same level as the `data JValue'. The point is that all declarations at the same level must have the same indentation (unless you use explicit braces and semicolons). > > D ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] ANNOUNCE: stringsearch 0.3.1, fast searching, splitting and replacing of ByteStrings
Changes vs. 0.3.0: - fixed a space leak in the splitting of lazy ByteStrings Changes of the 0.3 series vs. 0.2.*: - improved performance of the searching functions - new functionality: - breaking of ByteStrings at the first occurrence of a substring - splitting a ByteString at each occurrence of a substring - replacing all occurrences of a substring with another string Where bytestring provides the same functionality (Data.ByteString.breakSubstring, Data.ByteString.findSubstrings), the implementations in stringsearch are typically much faster. By default, stringsearch uses an enhanced Boyer-Moore algorithm to locate a pattern, but it also provides other algorithms which may be better in special cases (Knuth-Morris-Pratt; DFA). ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell] Re: [Haskell-cafe] ANN: HaRe-0.6, now on Hackage
On Wednesday 07 July 2010 13:33:19, Ivan Lazar Miljenovic wrote: > Chris BROWN writes: > > Dear Haskellers, > > > > As part of our project on Refactoring Functional Programs > > > > http://www.cs.kent.ac.uk/projects/refactor-fp/ > > > > we are pleased to announce the availability of HaRe 0.6 on Hackage. > > > > http://hackage.haskell.org/package/HaRe-0.6 > > Congratulations! > > One comment on your .cabal file: it's usually preferred to write "base > > >= 3 && <5" rather than "base >= 3 && <= 4". In particular if e.g. base-4.2.0.0 doesn't fall in the latter range. I don't know how exactly Cabal interprets these bounds, but it's a possibility since 4.2 > 4.0. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell