insideSum :: (Float, Float) -> FloatinsideSum (a,b) = a + b sumTuple :: [(Float, Float)] -> FloatsumTuple [] = 0sumTuple (x:xs) = insideSum x + sumTuple xs main = print insideSum (2.0,1.1)
Standard input is empty
[1 of 1] Compiling Main ( prog.hs, prog.o ) prog.hs:8:7: Couldn't match expected type `(t1, t2) -> t' against inferred type `IO ()' In the expression: print insideSum (2.0, 1.1) In the definition of `main': main = print insideSum (2.0, 1.1)
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!