countSequences :: Int -> Int -> Integer
countSequences 0 m = 0
countSequences m 0 = 0
countSequences (n) (m) = if (n <= (m+1)) then (truncate((cee (m+1) (n) (0))) + truncate((countSequences (fromIntegral (n-1)) (fromIntegral (m)))))
else truncate(countSequences (fromIntegral (n-1)) (fromIntegral (m)))
factorial :: Float -> Float
factorial 0 = 1
factorial 1 = 1
factorial x = x * factorial(x-1)
cee :: Float -> Float -> Float -> Float
cee x y z = if (x==y) then ((1) / (factorial ((x+z)-(y)))) else ((x) * (cee (x-1) (y) (z+1)))
i cant really understand why this error keep coming up .. the truncate is supposed to convert the type from Float to Integer so ..
mis of typeInt(per your type signature forcountSequences: hence, so ism + 1. However, your functionceeexpects aFloat, so the type checker righteously complains.Furthermore, you will need a couple of more fixes to make this type check. Here’s a version that passes the checker: