Re: HI && TypeCast

2003-08-10 Thread Sebastian Sylvan
On Wed, 6 Aug 2003, Fredrik Petersson wrote: > Hi there! > Iam new to the list so feel free to shout at me when i do wrong! :) > Software-designer from sweden, likes fast bikes and metal, thats me, and hi > to you all! > > Yeah ok to the problem, > i have this stupid code, > [c | (c,i) <- l] > >

Re: loop through the list...

2003-08-10 Thread Lennart Augustsson
This really sounds a lot like home work. :) -- Lennart Fredrik Petersson wrote: hi again... :) Ok assume i got this list of tuples [(10,1),(20,2),(30,3)] where i in (i,j) is a index, i want to go through the list and add a number witch matches the best index. Like 18 should give me [(10,1),(

overlapping instances and functional dependencies

2003-08-10 Thread Wolfgang Jeltsch
Hello, I have this code: class C a b c | a b -> c where f :: a -> b -> c instance C a b c => C a (x,y,b) c where f a (_,_,b) = f a b instance C a (a,c,b) c where f _ (_,c,_) = c ghci -fglasgow-exts -fallow-overlapping-instances compiles it without complaint b

Re: Implicit parameters, second draft

2003-08-10 Thread Ben Rudiak-Gould
On Sat, 9 Aug 2003, Ashley Yakeley wrote: > I'm a bit worried about the use of curly braces. Currently they're used > to mark blocks when "layout" isn't used. Might this clash? > > IIRC braces are used after "do", "where", "let", "in" and "of" (probably > OK), and also for data structures with