Parse and interpret the structure of a number without external hints.
Numbers are digit strings, possibly separated into digit groups by one
of two types of separators. (1) Numbers may optionally have a decimal
mark, which may be either a period or comma. (2) Numbers may
optionally contain digit group marks, which must all be either a
period, a comma, or a space.
It is our task to deduce the characters used as decimal mark and digit
group mark, based on the allowed syntax. For instance, we make use of
the fact that a decimal mark can occur at most once and must be to the
right of all digit group marks.
>>> parseTest rawnumberp "1,234,567.89"
Right (WithSeparators ',' ["1","234","567"] (Just ('.',"89")))
>>> parseTest rawnumberp "1,000"
Left (AmbiguousNumber "1" ',' "000")
>>> parseTest rawnumberp "1 000"
Right (WithSeparators ' ' ["1","000"] Nothing)