title: Haskell, multiplying Int and Float within a function
body: <p>Why is it that in ghci I can enter:</p>
  
  <pre><code>5.0 * (3 - 1)
  &gt; 10.0
  </code></pre>
  
  <p>But if I try and create a function in a .hs file and load it in:</p>
  
  <pre><code>test :: Float -&gt; Int -&gt; Int -&gt; Float
  test a b c = a * (b - c)
  </code></pre>
  
  <p>I am hit with an error? "Couldnt match expected type 'Float' against inferred type 'Int'?
  And how can I write a function that takes in one floating point and 2 integer arguments and performs the above operation on them?</p>
  
  <p>I am using ghci v6.12.1 if that makes a difference...</p>