Assuming you want to check whether your string is an natural number it boils down to
import Data.Char (isDigit)
hasNumber :: String -> Bool
hasNumber = all isDigit
If you don't want to use Data.Char (or aren't allowed if this is an assignment), you can use
isDigit = (`elem` ['0'..'9'])
If you want to check whether the number is integral, you have to check whether the string starts with a '-', and if it does, whether the rest of the string is a natural number:
isIntegral :: String -> Bool
isIntegral ('-':[]) = False -- string is "-", which isn't a number
isIntegral ('-':xs) = hasNumber xs -- string is "-....", so we check "...."
isIntegral x = hasNumber x -- string doesn't start with '-'
number :: Integral i => Int -> GenParser tok st Char -> GenParser tok st ifromText.ParserCombinators.Parsec.Number, or what's thatnumberin your question?