dhall-nix-lib/Integer/isZero.dhall

17 lines
630 B
Text

let Integer/nonPositive =
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/nonPositive.dhall
sha256:e00a852eed5b84ff60487097d8aadce53c9e5301f53ff4954044bd68949fac3b
let Integer/nonNegative =
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/nonNegative.dhall
sha256:b463373f070df6b1c8c7082051e0810fee38b360bab35256187c8c2b6af5c663
let isZero
: Integer → Bool
= λ(v : Integer) → Integer/nonPositive v && Integer/nonNegative v
let example0 = assert : isZero +2 ≡ False
let example1 = assert : isZero +0 ≡ True
in isZero