Re: [Haskell-cafe] Data.Text and quasi quoting

2012-10-03 Thread Jake Wheat
No, that's not the problem. I want to parse with more complicated asts containing both Text and antiquotes. On Wed, 3 Oct 2012 09:23:15 +0400 Dmitry Olshansky olshansk...@gmail.com wrote: Hello, if you change from test2 = [expr| test |] to test2 = [expr| $test |] then it will be

[Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Alfredo Di Napoli
Hello everyone, sorry for the dumb question but I'm wrapping my head around arrow just from this morning. Consider this toy function to swap argument of a tuple: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' = swapFirst swapSecond where swapFirst = first $ arr snd swapSecond =

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Brent Yorgey
On Wed, Oct 03, 2012 at 10:41:25AM +0200, Alfredo Di Napoli wrote: Hello everyone, sorry for the dumb question but I'm wrapping my head around arrow just from this morning. Consider this toy function to swap argument of a tuple: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' =

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Alfredo Di Napoli
Thanks Brent, this should do the trick, although what I was asking was something more general: For explicitly pass I meant passing them without the eta reduce, in other terms: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' t = () swapFirst swapSecond (???) where swapFirst =

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Ertugrul Söylemez
Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: Thanks Brent, this should do the trick, although what I was asking was something more general: For explicitly pass I meant passing them without the eta reduce, in other terms: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' t =

[Haskell-cafe] Problems installing DPH

2012-10-03 Thread Janek S.
Dear list, I ran into problems when installing DPH examples: [root@GLaDOS : ~] cabal --global install dph-examples Resolving dependencies... Configuring dph-examples-0.6.1.3... Building dph-examples-0.6.1.3... Preprocessing executable 'dph-spectral-smvm' for dph-examples-0.6.1.3... [1 of 3]

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Alfredo Di Napoli
I see. There exists an equivalent version but more generic? Just out of curiosity, I'm still pretty new to arrows, as you may have read :) Thanks, A. On 3 October 2012 15:59, Ertugrul Söylemez e...@ertes.de wrote: Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: Solution was simple,

Re: [Haskell-cafe] a parallel mapM?

2012-10-03 Thread Ryan Newton
Several of the monad-par schedulers COULD provide a MonadIO instance and thus liftIO, which would make them easy to use for this kind of parallel IO business: http://hackage.haskell.org/packages/archive/monad-par/0.3/doc/html/Control-Monad-Par-Scheds-Direct.html And that would be a little more

Re: [Haskell-cafe] a parallel mapM?

2012-10-03 Thread Clark Gaebel
I'm not sure that exposing a liftIO for Monad.Par is the best idea. Since all these parallel computations use runPar :: Par a - a, it advertises that the result is deterministic. I'm not really comfortable with a hidden unsafePerformIO hiding in the background. That said, I don't see a reason for

[Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Johan Tibell
On the behalf of the many contributors to cabal, I'm proud to present cabal-install-1.16.0. This release contains almost a year worth of patches. Highlights include: * Parallel installs (cabal install -j) * Several improvements to the dependency solver. * Lots of bugfixes We're also

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread José Lopes
Hello, I just tried to upgrade cabal-install using an older version and it yields the following error: Distribution/Client/JobControl.hs:63:6: Not in scope: `mask' If you need any machine/software specs let me know. Best regards, José On 10/03/2012 06:06 PM, Johan Tibell wrote: On the

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Johan Tibell
On Wed, Oct 3, 2012 at 6:21 PM, José Lopes jose.lo...@ist.utl.pt wrote: Hello, I just tried to upgrade cabal-install using an older version and it yields the following error: Distribution/Client/JobControl.hs:63:6: Not in scope: `mask' We tested on GHC 7.0.4, 7.4.1, and 7.6.1. If you need

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread José Lopes
Hey, I have debian 6.0.5 with GHC version 6.12.1 and base version 4.2.0.0 (although base 3.0.3.2 is also installed). Hope that helps! José On 10/03/2012 07:15 PM, Johan Tibell wrote: On Wed, Oct 3, 2012 at 6:21 PM, José Lopesjose.lo...@ist.utl.pt wrote: Hello, I just tried to upgrade

[Haskell-cafe] total Data.Map.! function

2012-10-03 Thread Henning Thielemann
I wondered whether there is a brilliant typing technique that makes Data.Map.! a total function. That is, is it possible to give (!) a type, such that m!k expects a proof that the key k is actually present in the dictionary m? How can I provide the proof that k is in m? Same question for

Re: [Haskell-cafe] total Data.Map.! function

2012-10-03 Thread Johan Tibell
Hi, On Wed, Oct 3, 2012 at 7:52 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: I wondered whether there is a brilliant typing technique that makes Data.Map.! a total function. That is, is it possible to give (!) a type, such that m!k expects a proof that the key k is actually

Re: [Haskell-cafe] a parallel mapM?

2012-10-03 Thread Ryan Newton
That said, I don't see a reason for not including a separate version of runParIO :: ParIO a - IO a for non-deterministic computations. It seems really useful! Exactly. I should have been more explicit but that's what I meant about adding another module. You would import

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Duncan Coutts
On 3 October 2012 18:22, José Lopes jose.lo...@ist.utl.pt wrote: Hey, I have debian 6.0.5 with GHC version 6.12.1 and base version 4.2.0.0 (although base 3.0.3.2 is also installed). I've pushed a fix for this. We'll wait a couple days to give a chance for other issues to be discovered, and

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Erik Hesselink
On Wed, Oct 3, 2012 at 6:06 PM, Johan Tibell johan.tib...@gmail.com wrote: On the behalf of the many contributors to cabal, I'm proud to present cabal-install-1.16.0. Congratulations and thanks to all those involved! To install: cabal update cabal install cabal-install-1.16.0

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Austin Seipp
Hi, Just a heads up: on Ubuntu 12.04 with GHC 7.4.1 out of apt (no haskell-platform,) using the bootstrap.sh script fails, because the constraints for CABAL_VER_REGEXP are too lax: $ sh ./bootstrap.sh Checking installed packages for ghc-7.4.1... Cabal is already installed and the version is ok.

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Johan Tibell
On Wed, Oct 3, 2012 at 9:15 PM, Austin Seipp mad@gmail.com wrote: Just a heads up: on Ubuntu 12.04 with GHC 7.4.1 out of apt (no haskell-platform,) using the bootstrap.sh script fails, because the constraints for CABAL_VER_REGEXP are too lax: $ sh ./bootstrap.sh Checking installed

[Haskell-cafe] Haskell Weekly News: Issue 246

2012-10-03 Thread Daniel Santa Cruz
Welcome to issue 246 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of September 23 to September 23, 2012. Want to contribute quotes for HWN? Until today the only way to help with those was to use @remember in the IRC

Re: [Haskell-cafe] Problems installing DPH

2012-10-03 Thread Erik de Castro Lopo
Janek S. wrote: Gogling the error message leads to various LLVM pages, which suggests that LLVM is the problem. I'm using Debian Squeeze with LLVM 2.6 and I'm thinking that maybe DPH needs newer version. From memory the first version of LLVM to support the GHC custom calling convention

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Ivan Lazar Miljenovic
On Oct 4, 2012 2:08 AM, Johan Tibell johan.tib...@gmail.com wrote: On the behalf of the many contributors to cabal, I'm proud to present cabal-install-1.16.0. Why the sudden change in versioning scheme (from 0.x to 1.x)? ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANN: cabal-install-1.16.0 (and Cabal-1.16.0.1)

2012-10-03 Thread Johan Tibell
On Wed, Oct 3, 2012 at 5:42 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On Oct 4, 2012 2:08 AM, Johan Tibell johan.tib...@gmail.com wrote: On the behalf of the many contributors to cabal, I'm proud to present cabal-install-1.16.0. Why the sudden change in versioning scheme