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




_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to