title: Haskell: Types don't match
body: <p>I just tried to write a simple function to calculate the average of the input-Ints:</p>
  
  <pre><code>avg :: Int -&gt; Int -&gt; Int -&gt; Float
  avg x y z = (x+y+z)/3
  </code></pre>
  
  <p>When I exchange the signature to</p>
  
  <pre><code>avg :: Float -&gt; Float -&gt; Float -&gt; Float
  </code></pre>
  
  <p>it works fine, but with the one above I get the following error message:</p>
  
  <p>Couldn't match expected type 'Float' with actual type 'Int'.</p>
  
  <p>Which possibilites do I have to use the first signature, which accepts Ints (only)?</p>