{- Note that this version has all mistakes corrected and that the types of errors listed in comments below only refer to what the example was showing. -} {- Indentation errors -} f x = x g y = y -- End Example h x | x > 2 = 0 | otherwise = 5 -- End Example count val n m p = isval n + isval m + isval p where isval x | x == val = 1 | otherwise = 0 -- End Example -- I will not use tabs... I will not use tabs... I will not use tabs... main = do let x = 5 in return x -- End Example {- Type errors -} -- f x = x + True i x y | x > y = i (x - y) y | y > x = i (y - x) x | otherwise = x -- End Example -- Pattern matching failure maxi (x,y) | x > y = x | y > x = y | otherwise = x -- End Example {- Logic errors -} fact 0 = 1 fact n = n * fact (n - 1) j x y | x > y = j (x - y) y | y > x = j (y - x) x | otherwise = x