Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
base Prelude Sign of a number. The functions abs and signum should satisfy the law:
abs x * signum x == x
For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive). -
base Prelude Convert from an Int.
-
base Control.Concurrent Returns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use setNumCapabilities.
setNumCapabilities :: Int -> IO ()base Control.Concurrent Set the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. The number passed to forkOn is interpreted modulo this value. The initial value is given by the +RTS -N runtime flag. This is also the number of threads that will participate in parallel garbage collection. It is strongly recommended that the number of capabilities is not set larger than the number of physical processor cores, and it may often be beneficial to leave one or more cores free to avoid contention with other processes in the machine.
DecimalNumber :: GeneralCategorybase Data.Char Nd: Number, Decimal
LetterNumber :: GeneralCategorybase Data.Char Nl: Number, Letter
OtherNumber :: GeneralCategorybase Data.Char No: Number, Other
-
base Data.Char Selects alphabetic or numeric Unicode characters. Note that numeric digits outside the ASCII range, as well as numeric characters which aren't digits, are selected by this function but not by isDigit. Such characters may be part of identifiers but are not used by the printer and reader to represent numbers, e.g., Roman numerals like V, full-width digits like '1' (aka '65297'). This function returns True if its argument has one of the following GeneralCategorys, or False otherwise:
-
base Data.Char Selects Unicode numeric characters, including digits from various scripts, Roman numerals, et cetera. This function returns True if its argument has one of the following GeneralCategorys, or False otherwise:
These classes are defined in the Unicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Number".Examples
Basic usage:>>> isNumber 'a' False >>> isNumber '%' False >>> isNumber '3' True
ASCII '0' through '9' are all numbers:>>> and $ map isNumber ['0'..'9'] True
Unicode Roman numerals are "numbers" as well:>>> isNumber 'Ⅸ' True
-