insideSum :: (Float, Float) -> FloatinsideSum (a,b) = a + b sumTuple :: [] -> FloatsumTuple [] = 0sumTuple (x:xs) = insideSum x + sumTuple xs main = sumTuple [(1.7,6.0),(4.3,-1.0),(9.1, 0.0)]
Standard input is empty
[1 of 1] Compiling Main ( prog.hs, prog.o ) prog.hs:4:12: `[]' is not applied to enough type arguments Expected kind `??', but `[]' has kind `* -> *' In the type `[] -> Float' In the type signature for `sumTuple': sumTuple :: [] -> Float
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!