title: Haskell: check if string is valid number
body: <p>How do I check for a decimal point when checking a string is a valid number?</p>
  
  <p>What I am thinking is that I use something like the following, but add code to check for the decimal point!</p>
  
  <pre><code>isNumber :: String -&gt; Bool
  isNumber xs = all isDigit xs || add extra code here
  </code></pre>
  
  <p>Where a valid number is defined in EBNF as:</p>
  
  <pre><code>number -&gt; .digit+ | digit+ [ .digit*]
  </code></pre>
  
  <p>For example, .5, 1.5, 1, 1. are all valid numbers. +
  signifies one or more occurrences, and * denotes zero or more.</p>