[Haskell-cafe] Haskell Weekly News: Issue 236

2012-07-18 Thread Daniel Santa Cruz
Welcome to issue 236 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of July 8 to 14, 2012. Quotes of the Week * RichardBuckminsterFuller: When I am working on a problem, I never think about beauty. But when I h

[Haskell-cafe] How to add constraint to .cabal?

2012-07-18 Thread Magicloud Magiclouds
Hi, Say I have a package that only appends --constraint="template-haskell==2.7.0.0" --constraint="warp-tls==1.2.1" could I install it. Now I want to release the package, then how could I have these constraint into the .cabal so the user would not get troubled? -- 竹密岂妨流水过 山高哪阻野云飞 And for G+, ple

[Haskell-cafe] HDBC nested withTransaction

2012-07-18 Thread Andras Gyomrey
Hi, are there any plans of implementing nested transactions using withTransaction in HDBC? In mysql exists checkpoints and in postgres explicit subtransactions, Andras Gyomrey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] strange hangs with -threaded runtime (now with test case)

2012-07-18 Thread Joey Hess
Just following up to my problem, I was seeing lots of hangs in various places in my program when it was built with the threaded runtime. I eventually tracked every single hang back to calls to MissingH's System.Cmd.Utils, including pipeFrom, pipeTo, pipeBoth, and pOpen. I was at this point runnin

[Haskell-cafe] Haskell Symposium 2012 - Call for Participation (early registration closes 9th August)

2012-07-18 Thread Janis Voigtländer
CALL FOR PARTICIPATION ACM SIGPLAN Haskell Symposium 2012 Copenhagen, Denmark 13th September, 2012 (directly after I

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-18 Thread Jay Sulzberger
On Wed, 18 Jul 2012, Jay Sulzberger wrote: On Tue, 10 Jul 2012, o...@okmij.org wrote: And yes to first order predicate calculus too! Just two weeks ago Chung-chieh Shan and I were explaining at NASSLLI the embedding in Haskell of the higher-order predicate logic with two base types (so

Re: [Haskell-cafe] How do I marshall a pointer over SendMessage LPARAM or WPARAM?

2012-07-18 Thread Yuras Shumovich
On Wed, 2012-07-18 at 18:22 +0200, Simon Peter Nicholls wrote: > Some "sending" code: > > Foreign.C.String.withCWString "frustrator" $ \s -> do > let wParam = System.Win32.Types.castPtrToUINT s :: > System.Win32.Types.WPARAM > Graphics.Win32.sendMessage

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 05:16:19PM +0100, Simon Hengel wrote: > CCing: Ross Paterson and Richard G. > > On Wed, Jul 18, 2012 at 05:54:44PM +0200, Martijn Schrage wrote: > > On 18-07-12 17:37, Erik Hesselink wrote: > > >Hi Martijn, > > > > > >Yes, upgrading will obviously fix things (we do use 0.14

[Haskell-cafe] How do I marshall a pointer over SendMessage LPARAM or WPARAM?

2012-07-18 Thread Simon Peter Nicholls
Cross-posted from Haskell-beginners. Apologies for not posting in the right place (though I am a beginner and have probably made a simpleton error). I'm new to Haskell, and have had some good success with FFI so far, but using Win32's sendMessage to send a pointer in LPARAM or WPARAM is resulting

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Simon Hengel
CCing: Ross Paterson and Richard G. On Wed, Jul 18, 2012 at 05:54:44PM +0200, Martijn Schrage wrote: > On 18-07-12 17:37, Erik Hesselink wrote: > >Hi Martijn, > > > >Yes, upgrading will obviously fix things (we do use 0.14 on our > >development machines) > Well, to me it wasn't entirely obvious th

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
I should probably be more clear - it supports all the same resource limiting mechanisms as Mueval because it uses Mueval (modified to support Safe Haskell). On Jul 18, 2012, at 11:37 AM, James Cook wrote: > The irc server it runs on has about 10 users, all of whom I know and trust, > so I have

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Martijn Schrage
On 18-07-12 17:37, Erik Hesselink wrote: Hi Martijn, Yes, upgrading will obviously fix things (we do use 0.14 on our development machines) Well, to me it wasn't entirely obvious that upgrading to Cabal-1.10.2.0 fixes the problem for cabal-install-0.12, and I still think this is a good solution

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Erik Hesselink
Hi Martijn, Yes, upgrading will obviously fix things (we do use 0.14 on our development machines), but we have not set up any infrastructure for building a custom cabal on production servers. We just use the one from the Ubuntu repositories, which uses Cabal 1.10.1.0 on oneiric. So until we upgrad

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
The irc server it runs on has about 10 users, all of whom I know and trust, so I have not tested it extensively but it should be as safe as anything else running Safe Haskell. Mueval uses the ghc API and with a minor modification can do so in "safe" mode. As long as you don't trust any packages

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Francesco Mazzoli
At Wed, 18 Jul 2012 11:04:17 -0400, Cale Gibbard wrote: > Lambdabot doesn't have a maintainer. So is it just orphaned and anyone can upload? That does not sound right, also considering that lambdabot is used on the IRC channel, it'd be nice to have a more structured way to push fixes and improveme

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Martijn Schrage
Hi Erik, A similar thing happened to me with the GraphViz package. As Duncan explained to me, the problem is that Cabal-1.10.0.0 (and I believe also 1.10.1.0) incorrectly reports an error when conditionals are used in test suites. Upgrading to Cabal-1.10.2.0 (or cabal-install-0.14.0 with Cab

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Gwern Branwen
On Wed, Jul 18, 2012 at 11:12 AM, James Cook wrote: > It diverged from the official version quite a while ago, but it builds on > the latest GHC and uses Safe Haskell for the @eval module. That doesn't sound very safe. How does it handle all the DoS attacks etc in the mueval test suite? -- gw

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread James Cook
For what it's worth, I've been maintaining a fork for personal use for quite a while[1]. It diverged from the official version quite a while ago, but it builds on the latest GHC and uses Safe Haskell for the @eval module. If someone happens to want to use it they are free to do so, and I'll ev

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Cale Gibbard
Lambdabot doesn't have a maintainer. On 18 July 2012 08:33, Francesco Mazzoli wrote: > At Wed, 18 Jul 2012 15:14:47 +0400, > Dmitry Malikov wrote: >> A few days ago I tried to install lambdabot package from hackage >> (4.2.3.2). Cabal install failed. >> >> Then I found DanBurton's github repo wit

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Dmitry Malikov
On 07/18/2012 04:33 PM, Francesco Mazzoli wrote: At Wed, 18 Jul 2012 15:14:47 +0400, Dmitry Malikov wrote: A few days ago I tried to install lambdabot package from hackage (4.2.3.2). Cabal install failed. Then I found DanBurton's github repo with some approaches to make lambdabot install fixed.

Re: [Haskell-cafe] Monads with "The" contexts?

2012-07-18 Thread Takayuki Muranushi
Done with some exercises on Gaussian distribution as a monad! http://en.pk.paraiso-lang.org/Haskell/Monad-Gaussian What do you think? Will this be a good approach or bad? Also this is the first page in my attempt to create runnable, and even testable wiki pages. To run the tests, please use hacka

[Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-18 Thread Erik Hesselink
Hi all, All cabal installs using cabal-install-0.10.2 are currently failing for us. This is due to the cabal file for HUnit-1.2.5.0, which was recently uploaded to hackage. The ouput I'm getting from cabal is just: Reading available packages... Resolving dependencies... cabal: Couldn't read cabal

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Erik Hesselink
On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson wrote: > On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote: >> I don't think you can install this package on 7.4. As Andres said, it >> requires containers 0.5, but ghc 7.4's base libraries (in this case, >> template-haskell) use contain

Re: [Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Francesco Mazzoli
At Wed, 18 Jul 2012 15:14:47 +0400, Dmitry Malikov wrote: > A few days ago I tried to install lambdabot package from hackage > (4.2.3.2). Cabal install failed. > > Then I found DanBurton's github repo with some approaches to make lambdabot > install fixed. > > All dependency packages (IOSpec, num

[Haskell-cafe] lambdabot-4.2.3.3

2012-07-18 Thread Dmitry Malikov
Hi. A few days ago I tried to install lambdabot package from hackage (4.2.3.2). Cabal install failed . Then I found DanBurton's github repo with some approach

[Haskell-cafe] A useful function for forking a thread, but letting the parent do setup first

2012-07-18 Thread Joey Adams
Here's a useful little function: -- | Fork a thread, but wait for the main thread to perform a setup action -- using the child's 'ThreadID' before beginning work in the child thread. forkSetup :: (ThreadId -> IO (Maybe a, r)) -- ^ Setup action to be called before the t

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 10:37:31AM +0100, Gregory Collins wrote: > Is there any reason QuickCheck specifically requires containers >= 0.5? > Perhaps its lower bound could be relaxed. It is sbv-2.2 that has that constraint. > On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson wrote: > Actually -

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Andres Löh
> I'm talking about unattended automated builds, so tweaking isn't an > option. On the other hand breaking the package environment isn't so bad, > because I'm throwing it away after each build. I'm not convinced that we should try to build packages at any price. If they're likely to cause problem

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Gregory Collins
Is there any reason QuickCheck specifically requires containers >= 0.5? Perhaps its lower bound could be relaxed. On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson wrote: > On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote: > > I don't think you can install this package on 7.4. As And

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote: > I don't think you can install this package on 7.4. As Andres said, it > requires containers 0.5, but ghc 7.4's base libraries (in this case, > template-haskell) use containers 0.4, and can't be reinstalled. I > guess your best bet is

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Erik Hesselink
On Wed, Jul 18, 2012 at 10:19 AM, Ross Paterson wrote: > On Wed, Jul 18, 2012 at 06:50:31AM +0100, Andres Löh wrote: >> Using --avoid-reinstalls blindly or as a default flag is also >> unfortunately not a good idea in general. There are simply too many >> cases where installing older versions of p

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 06:50:31AM +0100, Andres Löh wrote: > Using --avoid-reinstalls blindly or as a default flag is also > unfortunately not a good idea in general. There are simply too many > cases where installing older versions of packages (which is often the > only thing that helps) is not r

Re: [Haskell-cafe] stripSuffix

2012-07-18 Thread Evan Laforge
>> I can think of two cases where I'd want something like this. >> One is manipulating file extensions, where I'd want to use >> System.FilePath.splitExtension or something like that anyway. >> The other is suffix stripping for text processing, where I'd >> want to use a trie to match a whole lot o

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-18 Thread Jay Sulzberger
On Tue, 10 Jul 2012, o...@okmij.org wrote: And yes to first order predicate calculus too! Just two weeks ago Chung-chieh Shan and I were explaining at NASSLLI the embedding in Haskell of the higher-order predicate logic with two base types (so-called Ty2). The embedding supports type-safe