Module
Data.UInt
- Package
- purescript-uint
- Repository
- zaquest/purescript-uint
This module provides 32-bit unsigned integers. Provided type UInt
is based on the x >>> 0
trick analogous to how PureScript's Int
is based on x | 0
trick.
The type has range from 0
to 4294967295
.
#fromNumber Source
fromNumber :: Number -> UInt
Cast a Number
n
to UInt
by performing 0-bit unsigned right
shift n >>> 0
.
#fromNumber' Source
fromNumber' :: Number -> Maybe UInt
Convert a Number
which is already an UInt
to UInt
. Fails
for non-integers and integers not in range from 0
to 2^32-1
.
- Modules
- Data.
UInt - Data.
UInt. Gen