[Haskell] Haskell Weekly News: Issue 101 - January 19, 2009

2009-01-19 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20090119 Issue 101 - January 19, 2009 --- Welcome to issue 101 of HWN, a newsletter covering

RE: [Haskell] type inference & instance extensions

2009-01-19 Thread Sittampalam, Ganesh
Lennart Augustsson wrote: >> I had hoped that the code below (GHC 6.10+) would work, but it just >> sends GHC into a loop when you actually try to typecheck (1,1). I >> don't know if that's a bug in GHC or a misunderstanding on my part of >> how the typechecking should work. > A loop without turn

Re: [Haskell] type inference & instance extensions

2009-01-19 Thread Lennart Augustsson
A loop without turning on a flag to allow it must be a bug. -- Lennart On Mon, Jan 19, 2009 at 2:04 PM, Sittampalam, Ganesh wrote: > Doug McIlroy wrote: >> A fragment of an attempt to make pairs serve as complex numbers, >> using ghc/hugs extensions: >> >> instance Num a => Num (a,a) w

RE: [Haskell] type inference & instance extensions

2009-01-19 Thread Sittampalam, Ganesh
Doug McIlroy wrote: > A fragment of an attempt to make pairs serve as complex numbers, > using ghc/hugs extensions: > > instance Num a => Num (a,a) where > (x,y) * (u,v) = (x*u-y*v, x*v+y*u) > > Unfortunately, type inference isn't strong enough to cope with > > (

Re: [Haskell] type inference & instance extensions

2009-01-19 Thread Malcolm Wallace
Doug McIlroy wrote: > instance Num a => Num (a,a) where > (x,y) * (u,v) = (x*u-y*v, x*v+y*u) > > Unfortunately, type inference isn't strong enough to cope with > > (1,1)*(1,1) I'm guessing it is because (fromInteger 1, fromInteger 1) :: (Num a, Num b) => (a

[Haskell] type inference & instance extensions

2009-01-19 Thread Doug McIlroy
A fragment of an attempt to make pairs serve as complex numbers, using ghc/hugs extensions: instance Num a => Num (a,a) where (x,y) * (u,v) = (x*u-y*v, x*v+y*u) Unfortunately, type inference isn't strong enough to cope with (1,1)*(1,1) Why shouldn't it be strengt

[Haskell] Re: HaskellWiki Update

2009-01-19 Thread Heinrich Apfelmus
Ashley Yakeley wrote: > There has been a lot of spam on HaskellWiki. Since anonymous edits have > been switched off, a spammer tactic has been to create hundreds of > accounts to evade individual account blocks. > > To combat this, I have > > 1. deleted all user accounts that have made no edits;