
23 Dec
2004
23 Dec
'04
12:09 p.m.
Guys, What is wrong with this code? ************** import Complex roots :: (Complex, Complex, Complex) -> (Complex, Complex); roots (a,b,c) = (x1,x2) where { x1 = (b*b + (sqrt_delta))/(2*a); x2 = (b*b - (sqrt_delta))/(2*a); sqrt_delta = sqrt 4*a*c} ************** I load it into GHCi and get: ************** Kind error: `Complex' is not applied to enough type arguments In the type: (Complex, Complex, Complex) -> (Complex, Complex) While checking the type signature for `roots' Failed, modules loaded: none. ************** Thanks, Maurício