Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-18 Thread damodar kulkarni
Thanks again for the detailed and explanatory answer. That's the reason I'm writing these huge responses, because I hope I can shorten this journey for others. This has certainly helped me grasp some aspects in this regard. While Monad Transformers are awesome and can solve many problems

[Haskell-cafe] ANN: hspec-test-framework - Run test-framework tests with Hspec

2013-08-18 Thread Simon Hengel
Hi, I just released hspec-test-framework[1] and hspec-test-framework-th[2] to Hackage. They can be used to run test-framework tests with Hspec unmodified. This can also be used to work around test-framework's incompatibility with QuickCheck-2.6 and base-4.7.0 ;) Have a look at the README for

Re: [Haskell-cafe] ANN: hspec-test-framework - Run test-framework tests with Hspec

2013-08-18 Thread Alfredo Di Napoli
Hi Simon, this is an exciting news! May I ask the question that maybe is lurking in the shadow? Due to the recent announcement of Roman's tasty library, are there plans to basically release something similar to hspec-test-framework and hspec-test-framework-th but targeting tasty instead? Bye

[Haskell-cafe] abs minBound (0 :: Int) negate minBound == (minBound :: Int)

2013-08-18 Thread Nicolas Frisby
The docs at http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:gcd give a NB mentioning that (abs minBound == minBound) is possible for fixed-width types. This holds, for example, at Int. It is also the case that (negate minBound == minBound). Two questions: 1) This

Re: [Haskell-cafe] Alternative name for return

2013-08-18 Thread Nikolaos Bezirgiannis
Dag Odenhall dag.odenh...@gmail.com writes: I particularly like she's (her?) syntax for Alternative. Not sure whether or not Idris has that. Applicative tuples would be nice too, something like (|a,b,c|) translating to liftA3 (,,) a b c. And operators too, liftA2 (+) a b as (| a + b |)? I

[Haskell-cafe] ANN: processing-1.2.0.0. Graphic web applications with processing.js.

2013-08-18 Thread Daniel Díaz Casanueva
Hello readers of Haskell-Cafe. Yesterday I uploaded a new version of the processing library [1]. == What is this library for? == The library is oriented to create graphic applications that run in a web browser, with no need of running a server. It provides the user with a set of functions and

Re: [Haskell-cafe] ANN: hspec-test-framework - Run test-framework tests with Hspec

2013-08-18 Thread Simon Hengel
Hi, Due to the recent announcement of Roman's tasty library, are there plans to basically release something similar to hspec-test-framework and hspec-test-framework-th but targeting tasty instead? I care about Hspec[1] and want to provide an upgrade path for test-framework users, but I'm

[Haskell-cafe] MongoDB single insertions super slow

2013-08-18 Thread Kyle Hanson
I am trying to write a simple benchmark of testing 1000 single inserts in mongodb, but doing single insertions is super slow. It takes nearly 40 seconds to perform these operations with the haskell mongodb driver, but under a second to perform the same number of operations of single inserts in

Re: [Haskell-cafe] Database.postgreSQL.Simple - ambigious type

2013-08-18 Thread Hartmut Pfarr
Hi Tom, I played a bit with your suggestion, and it is running now :-) But instead of IO [Int] I think we need IO [Only Int] because of the 1-element-tupel problem? With IO [Only Int] it looks like this:

Re: [Haskell-cafe] MongoDB single insertions super slow

2013-08-18 Thread Carter Schonwald
Have you contacted the maintainer? I believe that the Haskell mongodb driver is maintained by someone at 10gen? (Or at least at some point was ) Without spending time looking at the mongo driver, it's hard to know. On Aug 18, 2013 3:58 PM, Kyle Hanson hanoo...@gmail.com wrote: I am trying to

Re: [Haskell-cafe] Database.postgreSQL.Simple - ambigious type

2013-08-18 Thread Tom Ellis
On Sun, Aug 18, 2013 at 10:16:06PM +0200, Hartmut Pfarr wrote: I played a bit with your suggestion, and it is running now :-) But instead of IO [Int] I think we need IO [Only Int] because of the 1-element-tupel problem? Yes you're right. I had forgotten that postgresql-simple dealt with

Re: [Haskell-cafe] abs minBound (0 :: Int) negate minBound == (minBound :: Int)

2013-08-18 Thread Richard A. O'Keefe
On 19/08/2013, at 3:38 AM, Nicolas Frisby wrote: The docs at http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:gcd give a NB mentioning that (abs minBound == minBound) is possible for fixed-width types. At least three ways to represent negative integers in