eriktim / elm-protocol-buffers / Protobuf.Types.Int64

A simple 64-bit integer made up from two 32-bit integers. This is used by the int64 and related en/decoders. This module is intentionally kept sparse to achieve the following goals:

If you find yourself needing extra logic/arithmetic revolving around 64-bit integers, please use one of the available packages providing what you need and convert with fromInts and toInts between the two data types.

Data Types


type alias Int64 =
Internal.Int64.Int64

The Int64 data type. Guarantees the invariant that the internal integers are kept between -2 ^ 31 and 2 ^ 31 - 1.

Conversions

fromInts : Basics.Int -> Basics.Int -> Int64

Build an Int64 from two Int values.

toInts : Int64 -> ( Basics.Int, Basics.Int )

Get the two Int values for higher and lower bits from an Int64.