Re: [Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-14 Thread Bas van Dijk
On Nov 14, 2012 10:44 PM, "Janek S." wrote: > calculateSeq :: [Double] -> [Double] > calculateSeq [] = [] > calculateSeq (x:xs) = (sin . sqrt $ x) : xs Do you really mean to calculate the 'sin . sqrt' of just the head of the list, or do you mean: calculateSeq = map (sin . sqrt) ? Bas

Re: [Haskell-cafe] Taking over ghc-core

2012-11-14 Thread Andreas Abel
Excellent! With ghc-core being maintained again, we can start thinking about compiling Agda to core instead of hs. Andreas On 11.11.12 11:41 AM, Bas van Dijk wrote: Great! On 10 November 2012 16:17, Shachaf Ben-Kiki wrote: With Don Stewart's blessing (

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread Richard O'Keefe
On 15/11/2012, at 1:03 AM, Serge D. Mechveliani wrote: > Please, > how to correctly set an explicit type for a local value in the body of > a polymorphic function? Other people have told you how to do it. I'd like to tell you why you don't need to. > > Example (tested under ghc-7.6.1): > >

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Vincent Hanquez
On 11/14/2012 09:53 AM, Ivan Lazar Miljenovic wrote: % cabal install virthualenv Resolving dependencies... cabal: Could not resolve dependencies: trying: virthualenv-0.2.1 rejecting: base-3.0.3.2, 3.0.3.1 (global constraint requires installed instance) rejecting: base-4.6.0.0

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Tobias Müller
Johan Tibell wrote: > On Wed, Nov 14, 2012 at 1:01 PM, Tobias Müller wrote: > > Clark Gaebel wrote: > To prevent this, I think the PVP should specify that if dependencies get > a major version bump, the package itself should bump its major version > (preferably the B field). > > No, it has not

[Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-14 Thread Janek S.
Dear Haskellers, I am reading Simon Marlow's tutorial on parallelism and I have problems with correctly using Eval monad and Strategies. I *thought* I understand them but after writing some code it turns out that obviously I don't because parallelized code is about 20 times slower. Here's a s

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Johan Tibell
On Wed, Nov 14, 2012 at 1:01 PM, Tobias Müller wrote: > Clark Gaebel wrote: > > To prevent this, I think the PVP should specify that if dependencies get > > a major version bump, the package itself should bump its major version > > (preferably the B field). > > No, it has nothing to do with majo

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Tobias Müller
Clark Gaebel wrote: > To prevent this, I think the PVP should specify that if dependencies get > a major version bump, the package itself should bump its major version > (preferably the B field). No, it has nothing to do with major/minor version bumps. It's just that if you underspecify your depe

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Clark Gaebel
To prevent this, I think the PVP should specify that if dependencies get a major version bump, the package itself should bump its major version (preferably the B field). Hopefully, in the future, cabal would make a distinction between packages * used* within another package (such as a hashmap excl

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Tobias Müller
Peter Simons wrote: > Hi Clark. > > > I think we just use dependencies [to specify] different things. > > If dependency version constraints are specified as a white-list -- > i.e. we include only those few versions that have been actually > verified and exclude everything else --, then we take

Re: [Haskell-cafe] mtl-2.1 severly broken, cabal needs blacklisting

2012-11-14 Thread Henning Thielemann
On Wed, 14 Nov 2012, Jean-Philippe Bernardy wrote: On Tue, Nov 13, 2012 at 11:39 PM, Andreas Abel wrote: On 13.11.12 11:13 PM, Jean-Philippe Bernardy wrote: Blacklisting equals releasing a bugfix. Not quite. I propose to *define* blacklisting as such.  package-X.Y.Z.W is

Re: [Haskell-cafe] Does anyone know where George Pollard is?

2012-11-14 Thread Myles C. Maxfield
False alarm. He got back to me. Thanks, Myles On Thu, Nov 8, 2012 at 12:20 AM, Ketil Malde wrote: > "Myles C. Maxfield" writes: > >> Does anyone know where he is? > > On GitHub? https://github.com/Porges One of the repos was apparently > updated less than a week ago. > >> If not, is there an a

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-14 Thread Alex Stangl
On Wed, Nov 14, 2012 at 07:39:33AM -, o...@okmij.org wrote: > dimensional memo table. Luckily, our case is much less general. We do > have a very nice dynamic programming problem. The key is the > observation > k' : solveR (i+1) k' > After a new element, k', is produced, it is used as an

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread Erik Hesselink
You need to enable ScopedTypeVariables, and add a forall to introduce the type variable at the top level. The local variable will then be the *same* 'a' instead of a fresh one: {-# LANGUAGE ScopedTypeVariables #-} data D a = D1 a | D2 a (a -> a) f :: forall a. Eq a => D a -> a f (D1 x)

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread Brent Yorgey
Turn on the ScopedTypeVariables extension (e.g. by putting {-# LANGUAGE ScopedTypeVariables #-} at the top of your file), and add an explicit 'forall a.' to the type signature of f. -Brent On Wed, Nov 14, 2012 at 04:03:57PM +0400, Serge D. Mechveliani wrote: > Please, > how to correctly set an ex

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread MigMit
{-# LANGUAGE ScopedTypeVariables #-} Отправлено с iPhone 14.11.2012, в 16:03, "Serge D. Mechveliani" написал(а): > Please, > how to correctly set an explicit type for a local value in the body of > a polymorphic function? > > Example (tested under ghc-7.6.1): > > data D a = D1 a | D2 a (a

[Haskell-cafe] local type denotation

2012-11-14 Thread Serge D. Mechveliani
Please, how to correctly set an explicit type for a local value in the body of a polymorphic function? Example (tested under ghc-7.6.1): data D a = D1 a | D2 a (a -> a) f :: Eq a => D a -> a f (D1 x) = x f (D2 x g) = let -- y :: Eq a => a y = g x in

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Erik Hesselink
On Wed, Nov 14, 2012 at 10:57 AM, Roman Cheplyaka wrote: > * Ivan Lazar Miljenovic [2012-11-14 > 20:53:23+1100] > > Doesn't this prevent the error of "this package won't build" (even if > > the error message doesn't precisely say that)? > > Yeah, it replaces one error with another. How is it sup

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Roman Cheplyaka
* Ivan Lazar Miljenovic [2012-11-14 20:53:23+1100] > Doesn't this prevent the error of "this package won't build" (even if > the error message doesn't precisely say that)? Yeah, it replaces one error with another. How is it supposed to help me if I really want to build this package? Instead of fi

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Ivan Lazar Miljenovic
On 14 November 2012 20:35, Roman Cheplyaka wrote: > * Erik Hesselink [2012-11-12 20:58:17+0100] >> And I believe the last base changes included a change to 'catch' which >> would have broken a lot of packages. The Num changes also caused a lot of >> code changes, and there were probably more I do

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-14 Thread Roman Cheplyaka
* Erik Hesselink [2012-11-12 20:58:17+0100] > And I believe the last base changes included a change to 'catch' which > would have broken a lot of packages. The Num changes also caused a lot of > code changes, and there were probably more I don't remember. Even if so, upper bounds don't prevent th