aboutsummaryrefslogtreecommitdiff
path: root/std/prelude/booleans.pk
blob: e92eac842f62728f543cd77beb56cd10b848ff72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## std.booleans: Booleans and related types. Mostly compiler magic.
## A stub module for documentation. Mostly compiler magic.

pub type unit = union[sole]
pub type bool = union[false, true]

## Boolean equality
@[magic]
pub func ==(a: bool, b: bool): bool

## Boolean inequality
@[magic]
pub func !=(a: bool, b: bool): bool

## Boolean negation
@[magic]
pub func not(a: bool): bool

## Boolean conjunction
@[magic]
pub func and(a: bool, b: bool): bool

## Boolean disjunction
@[magic]
pub func or(a: bool, b: bool): bool

## Boolean exclusive disjunction
@[magic]
pub func xor(a: bool, b: bool): bool