Skip to content

Commit

Permalink
Document Number Notation for primitive integers
Browse files Browse the repository at this point in the history
(cherry picked from commit fcfa007)
  • Loading branch information
proux01 authored and gares committed Dec 6, 2020
1 parent 403eafc commit d688bc2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/sphinx/user-extensions/syntax-extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,8 @@ Number notations
* :n:`Number.uint -> option @qualid__type`
* :n:`Z -> @qualid__type`
* :n:`Z -> option @qualid__type`
* :n:`Int63.int -> @qualid__type`
* :n:`Int63.int -> option @qualid__type`
* :n:`Number.number -> @qualid__type`
* :n:`Number.number -> option @qualid__type`

Expand All @@ -1721,6 +1723,8 @@ Number notations
* :n:`@qualid__type -> option Number.uint`
* :n:`@qualid__type -> Z`
* :n:`@qualid__type -> option Z`
* :n:`@qualid__type -> Int63.int`
* :n:`@qualid__type -> option Int63.int`
* :n:`@qualid__type -> Number.number`
* :n:`@qualid__type -> option Number.number`

Expand Down Expand Up @@ -1825,6 +1829,13 @@ Number notations
only for integers or non-negative integers, and the given number
has a fractional or exponent part or is negative.

.. exn:: int63 are only non-negative numbers.

:n:`Int63.int` are unsigned integers.

.. exn:: overflow in int63 literal @bigint

The constant is too big to fit into an unsigned 63-bit integer :n:`Int63.int`.

.. exn:: @qualid__parse should go from Number.int to @type or (option @type). Instead of Number.int, the types Number.uint or Z or Int63.int or Number.number could be used (you may need to require BinNums or Number or Int63 first).

Expand Down

0 comments on commit d688bc2

Please sign in to comment.