Safe Haskell | None |
---|---|
Language | Haskell2010 |
Common Types
Documentation
module Data.Word
module Data.Int
Type representing arbitrary-precision non-negative integers.
>>>
2^100 :: Natural
1267650600228229401496703205376
Operations whose result would be negative
,
throw
(
Underflow
::
ArithException
)
>>>
-1 :: Natural
*** Exception: arithmetic underflow
Since: base-4.8.0.0
Instances
data ShortByteString Source #
A compact representation of a
Word8
vector.
It has a lower memory overhead than a
ByteString
and does not
contribute to heap fragmentation. It can be converted to or from a
ByteString
(at the cost of copying the string data). It supports very few
other operations.
It is suitable for use as an internal representation for code that needs
to keep many short strings in memory, but it
should not
be used as an
interchange type. That is, it should not generally be used in public APIs.
The
ByteString
type is usually more suitable for use in interfaces; it is
more flexible and it supports a wide range of operations.
Instances
A space efficient, packed, unboxed Unicode text type.