Re: until, laziness, and performance

2016-03-27 Thread George Colpitts
Got it! Thanks!! On Sun, Mar 27, 2016 at 7:44 PM Dan Doel wrote: > On Sun, Mar 27, 2016 at 4:42 PM, George Colpitts > wrote: > > I still don't understand why > > > > as' i s > > | i >= n= s > > | otherwise = as' (i + 2) (s + (-1) / i + 1 / (i + 1)) > > > > > > is not lazy in its s

Re: until, laziness, and performance

2016-03-27 Thread Dan Doel
On Sun, Mar 27, 2016 at 4:42 PM, George Colpitts wrote: > I still don't understand why > > as' i s > | i >= n= s > | otherwise = as' (i + 2) (s + (-1) / i + 1 / (i + 1)) > > > is not lazy in its second arg as it only has to evaluate it if i >= n. This > seems exactly analogous to or,

Re:until, laziness, and performance

2016-03-27 Thread George Colpitts
Dan, I really appreciate that you responded so quickly and took the time to explain this. Unfortunately I still don't understand. I did think of laziness as a potential source of bad performance but to me both internal functions were lazy in the second argument. Since I couldn't explain why both

GHC 8 superclass chain constraint regression

2016-03-27 Thread Kosyrev Serge
Good day! It seems that GHC 8 regresses with regard to GHC 7.10, when it tries to satisfy the constraints, implied by instance context. The following does not build on GHC 8.0.1 RC2, but does on 7.10.3: > {-# LANGUAGE FlexibleInstances #-} > {-# LANGUAGE UndecidableInstances #-} > --{-# LANGUAGE