Much as in C, Haskell is rigidly typed. The averageThree is a good example of a
function that requires type coercion in order to return the right value type. However,
the difSquare function shows something distinct to Haskell. difSquare has no type
signature, so Haskell will infer the appropriate type signature from the operations
involved in the function definition. At first appearance this might seem to be the same
thing that dynamically or loosely typed languages do; but what Haskell does is quite
different. difSquare is rigidly typed at compile time--there is no runtime dynamism to
this, but the type of difSquare has a Type Class that includes both integers and floats
(and also rationals, complex numbers, etc.). We can find the inferred type within Hugs: