title: Overloading function signatures haskell
body: <p>I get the following error message when I compile:</p>
  
  <blockquote>
    <p>Duplicate type signature:<br>
    weightedMedian.hs:71:0-39: findVal :: [ValPair] -> Double -> Double<br>
    weightedMedian.hs:68:0-36: findVal :: [ValPair] -> Int -> Double</p>
  </blockquote>
  
  <p>My solution is to have findValI and findValD. However, findValI just converts the Int type to a Double and calls findValD.</p>
  
  <p>Also I can't pattern match on types of Num (Int, Double) so I can't just change the type signature to</p>
  
  <pre><code>findVal :: [ValPair] -&gt; Num -&gt; Double   
  </code></pre>
  
  <p>In many languages I wouldn't need different names. Why do I need different names in Haskell? Would this be hard to add to the language? Or are there dragons there?</p>