title: The number of digits of an integer in Haskell
body: <p>Classic problem, but in Haskell this time. I try to do this the C way but I keep getting this error </p>
  
  <pre><code>Variable not in scope: numDigits :: Integer -&gt; t
  </code></pre>
  
  <p>Here is the code I wrote</p>
  
  <pre><code>numDigits :: Integer -&gt; Integer
  numDigits n = toInteger (round (logBase 10 (fromIntegral n)) + 1)
  </code></pre>
  
  <p>Did i do something wrong? Or log</p>