title: Wrong function type declaration
body: <p>I have the following function that sholud return only odd numbers from the List</p>
  
  <pre><code>oddsOnly :: Integral a =&gt; [a] -&gt; [a]
  oddsOnly [] = []
  oddsOnly (x:xs)
   |odd x = x : oddsOnly xs
   |otherwise = oddsOnly xs
  </code></pre>
  
  <p>My question is about the aim of using </p>
  
  <blockquote>
    <p>Integral a =></p>
  </blockquote>
  
  <p>Actually it is not  posssible to implement such function with such type declaration </p>
  
  <blockquote>
    <p>oddsOnly :: [a] -> [a]</p>
  </blockquote>
  
  <p>As far as I know <em>even</em> and <em>odd</em> functions are in standart <em>Prelude</em> library so why simplified daclaration does not work?</p>
  
  <p>Thanks in advance</p>