Module Gil_syntax.UnOp

GIL Unary Operators

type t =
  1. | IUnaryMinus
    (*

    Integer unary minus

    *)
  2. | FUnaryMinus
    (*

    Float unary minus

    *)
  3. | UNot
    (*

    Negation

    *)
  4. | BitwiseNot
    (*

    Bitwise negation

    *)
  5. | M_isNaN
    (*

    Test for NaN

    *)
  6. | M_abs
    (*

    Absolute value

    *)
  7. | M_acos
    (*

    Arccosine

    *)
  8. | M_asin
    (*

    Arcsine

    *)
  9. | M_atan
    (*

    Arctangent

    *)
  10. | M_ceil
    (*

    Ceiling

    *)
  11. | M_cos
    (*

    Cosine

    *)
  12. | M_exp
    (*

    Exponentiation

    *)
  13. | M_floor
    (*

    Flooring

    *)
  14. | M_log
    (*

    Natural logarithm

    *)
  15. | M_round
    (*

    Rounding

    *)
  16. | M_sgn
    (*

    Sign

    *)
  17. | M_sin
    (*

    Sine

    *)
  18. | M_sqrt
    (*

    Square root

    *)
  19. | M_tan
    (*

    Tangent

    *)
  20. | ToStringOp
    (*

    Converts a number (integer or float) to a string

    *)
  21. | ToIntOp
    (*

    Converts a float to an integer, Num -> Num !!

    *)
  22. | ToUint16Op
    (*

    Converts an integer to a 16-bit unsigned integer, Num -> Num !!

    *)
  23. | ToUint32Op
    (*

    Converts an integer to a 32-bit unsigned integer, Num -> Num !!

    *)
  24. | ToInt32Op
    (*

    Converts an integer to a 32-bit signed integer, Num -> Num !!

    *)
  25. | ToNumberOp
    (*

    Converts a string to a number

    *)
  26. | TypeOf
  27. | Car
    (*

    Head of a list

    *)
  28. | Cdr
    (*

    Tail of a list

    *)
  29. | LstLen
    (*

    List length

    *)
  30. | LstRev
    (*

    List reverse

    *)
  31. | SetToList
    (*

    From set to list

    *)
  32. | StrLen
    (*

    String length

    *)
  33. | NumToInt
    (*

    Number to Integer - actual cast

    *)
  34. | IntToNum
    (*

    Integer to Number - actual cast

    *)
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val equal : t -> t -> Ppx_deriving_runtime.bool
val str : t -> string

Printer